Systems and methods for rapidly automatically focusing a machine vision inspection system

ABSTRACT

Auto focus systems and methods for a machine vision metrology and inspection system provide high speed and high precision auto focusing, while using relatively low-cost and flexible hardware. One aspect of various embodiments of the invention is that the portion of an image frame that is output by a camera is minimized for auto focus images, based on a reduced readout pixel set determined in conjunction with a desired region of interest. The reduced readout pixel set allows a maximized image acquisition rate, which in turn allows faster motion between auto focus image acquisition positions to achieve a desired auto focus precision at a corresponding auto focus execution speed that is approximately optimized in relation to a particular region of interest. In various embodiments, strobe illumination is used to further improve auto focus speed and accuracy. A method is provided for adapting and programming the various associated auto focus control parameters.

BACKGROUND OF THE INVENTION

This invention relates to systems and methods for automatically focusinga machine vision inspection system.

2. Description of Related Art

Methods for operating a machine vision inspection system with a cameraand stage that are movable relative to one another to focus on andinspect selected features of a workpiece on the stage are generallyknown. Precision machine vision inspection systems can be used to obtainprecise dimensional measurements of inspected objects and to inspectvarious other object characteristics. Such systems may include acomputer, a camera and optical system and a precision stage that ismovable in multiple directions to allow the camera to scan the featuresof a workpiece that is being inspected. One exemplary prior art system,of a type that can be characterized as a general-purpose “off-line”precision vision system, is the commercially available QUICK VISION™series of vision inspection machines and QVPAK™ software available fromMitutoyo America Corporation (MAC), located in Aurora, Ill. The featuresand operation of the QUICK VISION™ series of vision inspection machines,and the QVPAK™ software are generally described, for example, in theQVPAK 3D CNC Vision Measuring Machine Users Guide, published January2003 and the QVPAK 3D CNC Vision Measuring Machine Operation Guide,published September 1996, each of which is incorporated herein byreference in its entirety. This product, as exemplified, for example, bythe QV-302 Pro model, is able to use a microscope-type optical system toprovide images of a workpiece at various magnifications.

Such general-purpose “off-line” precision vision systems often include aprogrammable illumination system and a lens turret with lenses ofvarious magnifications, for example, in order to increase theirversatility and provide the ability to rapidly change theirconfiguration and imaging parameters in order to perform a wide varietyof inspection tasks. There is a common need to inspect various types ofobjects or inspection workpieces, or various aspects of a singleworkpiece, using various combinations of the magnifications and theprogrammable illumination settings.

General purpose precision machine vision inspection systems, such as theQUICK VISION™ system, are also generally programmable and operable toprovide automated video inspection. It is generally desirable that suchsystems include features and tools that simplify the programming andoperation of such systems, such that operation and programming can beperformed reliably by “non-expert” operators. For example, U.S. Pat. No.6,542,180, which is incorporated herein by reference in its entirety,teaches a vision system that uses automated video inspection, includingoperations in which the lighting used to illuminate a workpiece featureis adjusted based on a plurality of selected regions of an image of theworkpiece feature.

As taught in the '180 patent, automated video inspection metrologyinstruments generally have a programming capability that allows anautomatic inspection event sequence to be defined by the user for eachparticular workpiece configuration. The programming capability alsotypically provides the ability to store and/or output the results of thevarious inspection operations. Such programming can be implementedeither in a deliberate manner, such as text-based programming, forexample, or through a recording mode that progressively “learns” theinspection event sequence by storing a sequence of machine controlinstructions corresponding to a sequence of inspection operationsperformed by a user, or through a combination of both methods. Such arecording mode is often referred to as “learn mode” or “training mode”.

In either technique, the machine control instructions are generallystored as a part program that is specific to the particular workpiececonfiguration. The ability to create part programs with instructionsthat automatically perform a predetermined sequence of inspectionoperations during a “run mode” of operation provides several benefits,including enhanced inspection repeatability, as well as the ability toautomatically execute the same part program on a plurality of compatiblemachine vision inspection systems and/or at a plurality of times.

The exemplary QUICK VISION™ systems described above, as well as a numberof other commercially available general purpose “off-line” visionsystems, typically use conventional PC-based image acquisitionaccessories or components and conventional PC-based computer operatingsystems, such as the Windows™ operating system, to provide their methodsof operation, including their methods of operating during a sequence ofauto focus operations.

In general, during a sequence of auto focus operations the camera movesthrough a range of positions along a Z-axis and captures an image ateach position. For each captured image, a focus metric is calculated andrelated to the corresponding position of the camera along the Z-axis atthe time that the image was captured.

One known method of auto focusing is discussed in “Robust Auto focusingin Microscopy”, by Jan-Mark Geusebroek and Arnold Smeulders in ISISTechnical Report Series, Vol. 17, November 2000, which is incorporatedherein by reference, in its entirety. In order to determine a Z-axisposition of the camera that corresponds to an auto focus image, thediscussed method estimates a position of the camera along a Z-axis basedon a measured amount of time during which the camera moves from a knownoriginal position on the Z-axis at a constant velocity along the Z-axis,until the image is acquired. During the constant velocity motion, theauto focus images are captured at 40 ms intervals (video rate). Thedisclosed method teaches that the video hardware captures frames at afixed rate, and that the sampling density of the focusing curve can onlybe influenced by adjusting the stage velocity.

Another known auto focus method and apparatus is described in U.S. Pat.No. 5,790,710, which is incorporated herein by reference, in itsentirety. In the '710 patent a piezoelectric positioner is utilized inconjunction with a conventional motor-driven motion control system tocontrol the Z-axis position. The motor-driven motion control systemprovides a relatively coarser resolution positioning over a full rangeof travel, while the piezoelectric positioner provides fast and highresolution positioning over a limited range about the nominal positionestablished by the motor-driven system. The piezoelectric positionerprovides relatively improved auto focus speed and resolution. The '710patent further discloses using strobe lighting during auto focusoperations. The '710 patent teaches acquiring auto focus images at 60Hz.

In one embodiment, the “image was strobed near the end of the videofield after the piezoelectric focus had stopped at its new position”.The '710 patent also suggests an alternative in which the position hasto be moved at a constant velocity and the image frozen with a strobe.In each case, because the strobe shortens the effective exposure time ofthe camera, part of the normal integration period for acquiring a cameraframe image can be used for moving to a new position before firing thestrobe later within that integration period.

SUMMARY OF THE INVENTION

The auto focus methods referred to above provide auto focus images atconventional camera frame rates and provide relatively fast auto focuscapability. Relatively fast auto focus capability is also provided in avariety of so called “on-line” or “in-line” machine vision inspectionsystems, which are specifically designed to achieve a high throughputfor a specific set of inspection operations performed repeatedly on aparticular type of mass-produced part, in a particular operatingenvironment. Compared to the previously described general purposeprecision machine vision inspection systems, such on-line machine visioninspection systems need to change the parameters surrounding theirinspection operations much less frequently. Furthermore, flexibility isgenerally less important than high speed operation. Thus, such systemshave typically relied on specialized hardware configurations, andspecialized programming, in order to provide high speed operations,including relatively fast auto focus capability.

Another problem typical for related systems and methods is that machinevibrations, distortions and related auto focus position measurementerrors occur when various vision machine elements are abruptly stoppedjust prior to an auto focus image acquisition.

The various previously described known systems and methods forperforming auto focus operations suffer from either auto focusing speedlimitations; auto focusing precision limitations; costly, specialized,and/or relatively inflexible hardware; and/or the lack of a suitablemethod for simply and reliably adapting and programming the auto focusoperations for a variety of different workpieces or workpiece features,particularly when the auto focus operations include the use of strobedlighting. An auto focus system and methods that can overcome thesevarious disadvantages and limitations separately or in combination isdesirable.

In contrast to each of the previously described known systems andmethods for performing auto focus operations, the present inventionprovides high speed and high precision auto focusing suitable for ageneral purpose precision machine vision inspection system, while usingrelatively low-cost and flexible hardware. For example, relativelylow-cost commercially available PC-compatible machine vision componentsand motion components may be used, along with conventional PC-basedcomputer operating systems. Specialized motion elements such aspiezoelectric actuators, or the like, and their associated controlelements are not required in order to provide high precision in variousexemplary embodiments of the systems and methods for rapidlyautomatically focusing an image capturing device according to thisinvention.

A relatively low-cost commercially available camera may be used toprovide a reduced readout pixel set according to this invention. Thereduced readout pixel set corresponds to substantially less than thefull field of view of the camera along at least one dimension of thefield of view of the camera. The pixel values of the reduced readoutpixel set of an image may be output to the control system portion in atime that is substantially less than a time required for outputting thefull pixel set corresponding to a full field of view of the camera.Thus, a repetition rate for acquiring images and storing the datacorresponding to the reduced readout pixel set is substantially fasterthan the rate associated with acquiring images and storing the datacorresponding to a full pixel set for the entire field of view of thecamera.

Conventional PC-based computer operating systems and vision and motioncomponents generally contain various uncontrolled timing latencies,asynchronously-timed operations, and the like. Existing auto focussystems and methods for such systems and components have typicallyovercome these various unpredictable timing relations and variations ina way that is relatively slow to execute, in order to provide adequatetiming margins and reliably provide a desired level of focusing accuracyor repeatability. Alternatively, existing auto focus systems and methodshave accepted relatively reduced precision, repeatability orreliability. Such auto focus speed problems have not been adequatelyaddressed by prior auto focus systems and methods implemented using suchPC-based computer operating systems and components, and such auto focussystems and methods are deficient in this regard. Thus, in variousexemplary embodiments of the systems and methods for rapidlyautomatically focusing an image capturing device according to thisinvention, adequate timing margins and reliable levels of focusingaccuracy, precision and repeatability are achieved while rapidlyexecuting auto focus operations without dependence on the timinglatencies of a PC.

In addition, various exemplary embodiments of the systems and methodsaccording to this invention provide auto focus systems and methods thatcan be simply and reliably adapted, operated and programmed for avariety of different workpieces or workpiece features, includingembodiments where the auto focus operations include the use of strobedlighting. Furthermore, various exemplary embodiments of the systems andmethods according to this invention provide systems and methods thatallow such adaptation, operation and programming to be performedreliably by “non-expert” operators during manual inspection operationsand during various training mode operations.

It should be appreciated that the systems and methods for rapidlyautomatically focusing an image capturing device according to thisinvention are particularly advantageous for use in precision auto focusoperations usable in machine vision metrology and inspection systems.The systems and methods according to this invention generally provideauto focus accuracy and repeatability that are a small percentage of thedepth of field provided by an imaging lens. This is particularlyimportant for a precision machine vision inspection system used formetrology. It should be appreciated that the auto focus systems utilizedby many other types of systems primarily provide clear images, and areoften comparatively crude in terms of their repeatability relative tothe depth of field of an imaging lens. This is because a clear image isprovided over a relatively large portion of the depth of field.

This invention provides systems and methods for automatically focusingan image capture device with high speed and high precision using areduced readout pixel set.

This invention separately provides systems and methods for defining areduced readout pixel set that is actually output for a number of autofocus images to increase the achievable rate of auto focus imageacquisition.

This invention separately provides systems and methods for automaticallyfocusing an image capture device to provide high speed and highprecision using a relatively limited number of setup conditions and/orparameters that are not automatically determined.

This invention separately provides systems and methods for acquiringauto focus images while moving the camera relative to the workpiece.

This invention separately provides systems and methods for acquiringauto focus images while accelerating the camera relative to theworkpiece.

This invention separately provides systems and methods for acquiring athigh speed various auto focus images while rapidly moving the cameraand/or workpiece in a manner that does not give rise to potentialmachine vibrations, distortions and/or related auto focus positionmeasurement errors that otherwise tend to occur if various visionmachine elements are abruptly stopped just prior to auto focus imageacquisition.

This invention separately provides systems and methods for determiningthe reduced readout pixel set portion of an image frame that is actuallyoutput for a number of auto focus images based on the size and locationof a region of interest of a workpiece.

This invention separately provides various graphical user interfaceelements usable with the systems and methods for determining a desiredalignment or overlap between a portion of an image frame that isactually output for a number of auto focus images and a region ofinterest of a workpiece.

This invention separately provides systems and methods for moving thecamera relative to the workpiece at a speed that is determined based onan achievable repetition rate of auto focus image acquisition and adesired focus curve sample density.

This invention separately provides systems and methods for determiningthe effective exposure time of an auto focus image by strobe lightillumination, and for selecting a strobe duration that limits thedisplacement of a moving camera within a desired range during theeffective exposure time of the auto focus image.

This invention separately provides systems and methods for determining astrobe light power level used during a strobe duration based on acontinuous illumination power setting that is known to produceacceptable image characteristics over an effective exposure durationthat is longer than the strobe duration.

This invention separately provides systems and methods for determiningthe portion of an image frame that is actually output for a number ofauto focus images based on a desired minimum size of a region ofinterest that determines corresponding maximum achievable sample rate.

This invention separately provides systems and methods for determining amaximum camera motion speed based on the maximum achievable sample rateand a desired focus curve sample density that is related to a desiredfocus accuracy.

This invention separately provides systems and methods for determining astrobe duration based on a maximum allowable camera displacement desiredduring an effective auto focus image exposure time.

This invention separately provides systems and methods for determining alight power level used during the strobe duration based on a continuousillumination power setting that is known to produce acceptable imagecharacteristics over an effective exposure duration that is longer thanthe strobe duration to achieve a desired auto focus precision at acorresponding auto focus execution speed that is approximately optimizedin relation to a particular region of interest for the auto focusoperations.

This invention separately provides systems and methods that provide astrobe lighting controller that is easily interfaced to variousconventional PC-compatible machine vision components and that receivesvarious control signals and provides controlled illumination powerlevels, fast operation and predictable timing for various auto focusoperations.

This invention separately provides systems and methods that provide astrobe lighting controller that is operable to control continuousillumination operations.

This invention separately provides systems and methods that provide thestrobe lighting controller that is installable as a retrofit to variousexisting machine vision systems, which can then implement variousimproved auto focus operations according to this invention.

In various exemplary embodiments of the systems and methods according tothis invention, when the camera is moving during an auto focus imageacquisition, at least one position value related to the imaging distancefor that auto focus image is captured in relation to the effectiveexposure time of the auto focus image. In various exemplary embodiments,this is done to provide the auto focus image distance with highprecision, reliability and/or certainty.

In various exemplary embodiments of the systems and methods according tothis invention, a vision inspection system that incorporates variousimproved auto focus operations according to this invention is placedinto a training or learning mode to determine parameters such as aselected lens, the dimensions and location of a region of interest, thedimensions and location of a reduced readout pixel set, illuminationsettings, auto focus scan speed and range, and the like, for morequickly and accurately automatically focusing on a particular workpiece.

In various exemplary embodiments of the systems and methods according tothis invention, when the vision inspection system is placed into atraining or learning mode, a graphical user interface (GUI) is providedfor an operator to use in connection with defining auto focusingoperations and some or all of the above-specified parameters are definedand/or determined. In various exemplary embodiments of the systems andmethods according to this invention a demonstration of the results ofthe defined auto focusing operations is conveniently provided in thetraining mode, for verification of the results. In various exemplaryembodiments, the operator initiates the demonstration through a featureof the GUI. In various exemplary embodiments of the systems and methodsaccording to this invention, part program instructions are then createdto use predetermined, defined, or newly determined parameters or thelike, in conjunction with zero, one or more other operations, to speedup and/or enhance the robustness of the operations which automaticallydetermine an estimated best focus position and/or focus on a region ofinterest on a workpiece.

In various exemplary embodiments of the systems and methods according tothis invention, one or more focus values are determined only for alimited region of interest captured in a reduced readout pixel set ofvarious auto focus images. In various exemplary embodiments such focusvalues allow an estimated best focus position to be determined with highprecision and at high speed using a computer or controller of themachine vision system.

In various exemplary embodiments of the systems and methods according tothis invention, the estimated best focus position is used as aninspection coordinate for a feature of the region of interest, andinspection operations are continued at another position on theworkpiece.

In various exemplary embodiments of the systems and methods according tothis invention, the estimated best focus position is used to select anexisting auto focus image of the region of interest that is used forinspection in the region of interest.

In various exemplary embodiments of the systems and methods according tothis invention, the estimated best focus position is relatively moreapproximate when a relatively lower accuracy is acceptable andrelatively less approximate when a relatively higher accuracy isrequired.

In various exemplary embodiments of the systems and methods according tothis invention, a machine vision system automatically recalls and/orsets various auto focus parameters for a particular workpiece based on apart program determined during a training mode, executes various autofocus operations based on the various auto focus parameters,automatically locates an estimated best focus position for theworkpiece, and obtains or defines at least one desirable inspectionimage of the workpiece corresponding to the located estimated best focusposition.

In various exemplary embodiments of the systems and methods according tothis invention, a machine vision system automatically recalls and/orsets various auto focus parameters for a particular workpiece based on apart program determined during a training mode; executes various autofocus operations based on the various auto focus parameters, includingusing an initial set of strobe illumination parameters to acquire atleast one image and refining at least one strobe illumination parameterbased on automatically evaluating at least one image characteristic ofthe at least one image; automatically locates an estimated best focusposition for the workpiece, and acquires or defines at least onedesirable inspection image of the workpiece.

In various exemplary embodiments of the systems and methods according tothis invention, the inspection image is obtained using the refinedstrobe illumination parameters at the located estimated best focusposition.

These and other features and advantages of this invention are describedin, or are apparent from, the following detailed description of variousexemplary embodiments of the systems and methods according to thisinvention.

BRIEF DESCRIPTION OF THE DRAWINGS

Various exemplary embodiments of the systems and methods of thisinvention will be described in detail, with reference to the followingfigures, wherein:

FIG. 1 is a diagram of one exemplary general purpose machine visioninspection system;

FIG. 2 is a block diagram showing in greater detail one exemplaryembodiment of the control system portion and the vision componentsportion of the machine vision inspection system of FIG. 1;

FIG. 3 is a representative graph illustrating a focus curvecorresponding to a set of densely sampled focus curve data points;

FIG. 4 is a representative graph illustrating a focus curvecorresponding to a set of sparsely sampled focus curve data points;

FIG. 5 is a schematic diagram showing one exemplary embodiment of astrobe light control system according to this invention;

FIG. 6 is a flowchart outlining one exemplary embodiment of a method fordetermining parameters for automatically focusing on a region ofinterest of a workpiece according to this invention;

FIG. 7 shows an exemplary workpiece and feature to be inspected, alongwith an exemplary multi area image quality tool usable to determine adesirable auto focus illumination in various embodiments of the systemsand methods according to this invention;

FIG. 8 shows the exemplary workpiece and feature to be inspected of FIG.7, along with two exemplary embodiments of graphical user interface autofocus tool widgets usable in various embodiments of the systems andmethods according to this invention;

FIGS. 9 and 10 show the exemplary workpiece and feature to be inspectedof FIG. 7, along with exemplary embodiments of graphical user interfaceauto focus tool widgets and exemplary embodiments of reduced readoutpixel set indicating widgets usable in various embodiments of thesystems and methods according to this invention;

FIG. 11 shows one exemplary embodiment of a graphical user interfaceauto focus tool widget, along with exemplary embodiments of variouscontrol widgets usable to select various modes and operations associatedwith auto focus operations in a training mode according to thisinvention;

FIG. 12 illustrates one exemplary embodiment of a graphical userinterface for an exemplary auto focus tool usable according to thisinvention;

FIG. 13 is a plot illustrating a generic relationship between region ofinterest size and focus image acquisition rate in various exemplaryembodiments according to this invention;

FIG. 14 is a plot illustrating exemplary generic relationships betweenfocus image acquisition rate and auto focus scan motion speed for alower accuracy mode and a higher accuracy mode, in various exemplaryembodiments according to this invention;

FIG. 15 is a plot comparing motion characteristics associated with arelatively slow auto focus image acquisition rate and a relativelyfaster auto focus image acquisition rate in various exemplaryembodiments according to this invention;

FIG. 16 is a plot illustrating exemplary generic relationships between alight setting (power setting) during a satisfactory continuousillumination and corresponding strobe duration times for a variety ofstrobe light power levels, according to this invention; and

FIGS. 17 and 18 are flowcharts outlining one exemplary embodiment of amethod for automatically focusing an image capture device according tothis invention.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

FIG. 1 is a block diagram of one exemplary embodiment of a generalpurpose programmable machine vision inspection system 10 in accordancewith this invention. The machine vision inspection system 10 includes avision measuring machine 200 that is operably connected to exchange dataand control signals with a control system 100. The control system 100 isfurther operably connected to exchange data and control signals with oneor more of a monitor 111, a printer 112, a joystick 113, a keyboard 114,and/or a mouse 115. The vision measuring machine 200 includes a moveableworkpiece stage 210 and an optical imaging system 205 which may includea zoom lens or a number of interchangeable lenses. The zoom lens orinterchangeable lenses generally provide various magnifications for theimages provided by the optical imaging system 205.

The joystick 113 can typically be used to control the movement of themovable workpiece stage 210 in both the X and Y directions, which aregenerally parallel to the focal planes of the optical imaging system205, and the movement direction component of the movable optical imagingsystem 205 in the Z or focus direction. Frequently, the deflection thatcontrols the Z axis is a rotary deflection component of a handle or knobof the joystick 113. The joystick 113 may be provided in a form otherthan that shown, such as any visual representation or widget on themonitor 111 which is intended to function as a “virtual motion controldevice” of the machine vision inspection system 10 and is controllablethrough any computer input device, such as the mouse 115 or the like.

FIG. 2 shows in greater detail one exemplary embodiment of the machinevision inspection system 10, the vision measuring machine or visioncomponents portion 200 and the control system or control system portion100 of FIG. 1. As shown in FIG. 2, the control system portion 100controls the vision components portion 200. The vision componentsportion 200 includes an optical assembly portion 250, light sources 220,230 and 240, and the workpiece stage 210 having a central transparentportion 212. The workpiece stage 210 is controllably movable along X andY axes that lie in a plane that is generally parallel to the surface ofthe stage where a workpiece 20 may be positioned. The optical assemblyportion 250 includes a camera system 260, an interchangeable objectivelens 252, a turret lens assembly 280, and the coaxial light source 230.The optical assembly portion 250 is controllably movable along a Z axisthat is generally orthogonal to the X and Y axes by using a controllablemotor 294. Each of the X, Y and Z axes of the machine vision inspectionsystem 10 are instrumented with respective X, Y and Z axis positionencoders (not shown) that provide X, Y and Z position information to thecontrol system portion 100 over suitable signal and/or control lines(not shown).

The workpiece 20 to be imaged using the machine vision inspection system10 is placed on the workpiece stage 210. One or more of the lightsources 220, 230 or 240 emits source light 222, 232, or 242,respectively, that is usable to illuminate the workpiece 20. Lightemitted by the light sources 220, 230 and/or 240 illuminates theworkpiece 20 and is reflected or transmitted as workpiece light 255,which passes through the interchangeable objective lens 252 and one of alens 286 or a lens 288 of the turret lens assembly 280 and is gatheredby the camera system 260. The image of the workpiece 20, captured by thecamera system 260, is output through a signal and control line 262 tothe control system portion 100. In various exemplary embodimentsaccording to this invention, the camera system 260 is operable to outputa reduced readout pixel set that is smaller than the full field of viewof the camera in a time that is shorter than a time required to output afull pixel set corresponding to the full field of view. In variousexemplary embodiments, this is for the purpose of decreasing the overalltime of auto focus operations according to this invention.

The light sources 220, 230, and 240 that are used to illuminate theworkpiece 20 can include the stage light 220, the coaxial light 230, andthe surface light 240, such as a ring light or a programmable ringlight, connected to the control system portion 100 through signal linesor busses 221, 231 and 241, respectively. In various exemplaryembodiments of the systems and methods according to this invention, oneof more of the light sources 220-240 are usable in a strobe illuminationmode of operation. In such exemplary embodiments it is desirable toprovide lights sources operable to provide a combination of a very fastlight source response time (in the microsecond or sub-microsecond range)and suitable optical power levels. Thus, in various exemplaryembodiments, the light source(s) that is (are) used for strobing includea high intensity LED, such as one of the LEDs in the Luxeon™ productline, available from Lumileds Lighting, LLC, of San Jose, Calif. Invarious exemplary embodiments, the light source(s) that is(are) used forstrobing include a blue LED with a wavelength of approximately 470 nm.However, any wavelength within the sensing range of the camera is usedin various exemplary embodiments. In general, any of the previouslydescribed light sources 220-240 may be implemented using such an LED invarious exemplary embodiments. In various exemplary embodiments of thesystems and methods according to this invention, one of more of thelight sources 220-240 are usable in both a continuous illumination modeand in a strobe illumination mode of operation.

As a primary optical assembly of the machine vision inspection system10, the optical assembly portion 250 may include, in addition to thepreviously discussed components, other lenses, and other opticalelements such as apertures, beamsplitters and the like, such as may beneeded for providing coaxial illumination, or other desirable machinevision inspection system features. The control system portion 100rotates the turret lens assembly 280 along axis 284, between at leastthe first and second turret lens positions in order to provide variousmagnifications, based on control signals transmitted over a signal lineor bus 281.

The distance between the workpiece stage 210 and the optical assemblyportion 250 can be adjusted to change the focus of the image of theworkpiece 20 captured by the camera system 260. In particular, invarious exemplary embodiments of the machine vision inspection system10, the optical assembly portion 250 is movable in the vertical Z axisdirection relative to the workpiece stage 210 using the controllablemotor 294 that drives an actuator, a connecting cable, or the like, tomove the optical assembly portion 250 along the Z axis. The term Z axis,as used herein, refers to the axis that is intended to be used forfocusing the image obtained by the optical assembly portion 250. Thecontrollable motor 294, when used, is connected to the control systemportion 100 via a signal line 296.

As shown in FIG. 2, in various exemplary embodiments, the control systemportion 100 includes a controller 120, an input/output interface 110, amemory 130, an imaging control interface 140, a motion control subsystem145, a lighting system driver/controller 150, a workpiece part programgenerating circuit, routine or application 155, a part program executingcircuit, routine or application 165, an auto focus operation determiningcircuit, routine or application 170, and a region of interest focusvalue determining and comparing circuit, routine or application 175,which are interconnected by one or more data and/or control bussesand/or application programming interfaces 195. It should be appreciatedthat such circuits, routines or applications encompass hard-wiredcircuits, software circuits, subroutines, objects, operations,application programming interfaces, managers, applications, or any otherknown or later-developed hardware or software structure.

In various exemplary embodiments, the memory portion 130 stores dataand/or “tools” usable to operate the vision system components portion200 to capture or acquire an image of the workpiece 20 such that theacquired image of the workpiece 20 has desired image characteristics.The memory portion 130 may further store data and/or video tools usableto operate the machine vision inspection system 100 to perform variousinspection and measurement operations on the acquired images, eithermanually or automatically, and to output the results through theinput/output interface 130 by way of data and/or control busses and/orapplication programming interfaces 195. The memory portion 130 may alsocontain data defining a graphical user interface operable through theinput/output interface 110 by way of data and/or control busses and/orapplication programming interfaces 195. Such an embodiment isexemplified by the previously mentioned QUICK VISION™ series of visioninspection machines and the QVPAK™ software, for example.

The signal lines or busses 221, 231 and 241 of the stage light 220, thecoaxial light 230, and the surface light 240, respectively, are allconnected to the input/output interface 110. A control signal line orbus 281 of the turret lens assembly 280 is also connected to theinput/output interface 110. Respective signal and/or control lines (notshown) of the respective X, Y and Z axis position encoders (not shown)are also connected to the input/output interface 110. The signal andcontrol line 262 from the camera system 260 and the signal line 296 fromthe controllable motor 294 are also connected to the input/outputinterface 110. In addition to carrying image data, the signal andcontrol line 262 may carry various signals from the controller 120 that,in various exemplary embodiments according to this invention, set animage acquisition pixel range for the camera, initiate an imageacquisition camera operation sequence, or the like.

One or more display devices 102, such as the monitor 111 and the printer112 and one or more input devices 104, such as the devices 113-115, canalso be connected to the input/output interface 110. The display devices102 and input devices 104 can be used to view, create and/or modify partprograms, to view the images captured by the camera system 260, to viewand/or modify various GUI elements and widgets usable to monitor andcontrol the vision system components portion 200 and/or to directlycontrol the vision system components portion 200. In a fully automatedsystem having a predefined workpiece program, the display devices 102and/or one or more of the input devices 104 may be omitted.

The control system portion 100 is usable to determine image acquisitionsettings or parameters and/or acquire an image of the workpiece 20 suchthat the input image of the workpiece 20 has desired imagecharacteristics in a region of interest that includes a workpiecefeature to be inspected. For example, various exemplary embodiments ofauto focus systems and methods according to this invention are usable inconjunction with the control system portion 100 to establish desiredimage characteristics that depend on the quality of focus in the regionof interest that includes the workpiece feature to be inspected. Invarious exemplary embodiments, when a user uses the machine visioninspection system 10 to create a workpiece image acquisition program forthe workpiece 20 according to this invention, the user generatesworkpiece program instructions either by explicitly coding theinstructions automatically, semi-automatically, or manually, using aworkpiece programming language, or by generating the instructions bymoving the machine vision inspection system 100 through an imageacquisition training sequence such that the workpiece programinstructions capture operations and settings defined according to thetraining sequence.

These workpiece imaging instructions are encoded by the workpiece partprogramming generating circuit, routine or application 155 andtransmitted to other components through data and/or control bussesand/or application programming interfaces 195. The physical movementsare controlled by the motion control subsystem 145. In order to achievecontrol of the physical movements of, for example, the camera system260, the motion control subsystem 145 receives position information fromthe X, Y and Z axis position encoders and transmits position alteringcontrol signals via data and/or control busses and/or applicationprogramming interfaces 195. In general, these instructions will causethe machine vision inspection system 10 to manipulate the workpiecestage 210 and/or the camera system 260 such that a particular portion ofthe workpiece 20 is within the field of view of the camera system 260and will provide a desired magnification, a desired focus state and adesired illumination. These actions are executed by the part programexecuting circuit, routine or application 165 by way of data and/orcontrol busses and/or application programming interfaces 195. Thisprocess may be repeated for multiple images in a set of images that areto be captured for inspecting a workpiece.

In various exemplary embodiments, for each auto focus image according tothis invention, alternatively referred to as a focus image herein, andfor the resulting desired inspection image, the control system portion100 will then command the camera system 260 to capture an image of theworkpiece 20, and output at least an image portion corresponding to aregion of interest of the workpiece 20 in the captured image, to thecontrol system portion 100. These functions are controlled by theimaging control interface 140 using signals passing between the variouscomponents over data and/or control busses and/or applicationprogramming interfaces 195. In particular, in various exemplaryembodiments, the camera system 260 reads out the output pixel values ofat least an image portion corresponding to a portion of the region ofinterest through the input/output interface 110, and they are convertedto digital values if they are not already in that form, and stored inthe memory 130 under control of the controller 120. In various exemplaryembodiments, the portion of the region of interest corresponding to theimage portion is a substantial portion of the region of interest. Invarious exemplary embodiments, the controller 120 causes the capturedimage to be displayed on one of the display devices 102.

In particular, in various exemplary embodiments, a camera system 260 isused that is operable to output at least one configuration of a reducedreadout pixel set that is smaller than the full field of view of thecamera system 260. In various exemplary embodiments, this is done inorder to provide a repetitive image acquisition and output rate that issignificantly faster than a standard repetitive image acquisition rateassociated with one or more fields corresponding to the full field ofview of the camera system 260. In various exemplary embodiments thecamera systems 260 is a digital camera system that outputs digital pixelvalues. In various exemplary embodiments of this type, the camera system260 is implemented using a Redlake MEGAPLUS Camera, Model ES 310/T,commercially available from Redlake, 11633 Sorrento Valley Road, SanDiego, Calif. 92121-1010 USA, or a CCD camera having similar and/orsufficient capabilities according to this invention. Also, in variousexemplary embodiments of this type, a framegrabber included in theimaging control interface 140 is implemented using a MatroxMeteor-II/Digital framegrabber, commercially available from MatroxElectronic Systems Ltd., of Quebec, Canada, or a framegrabber cardhaving similar and/or sufficient capabilities according to thisinvention.

In various other exemplary embodiments, the camera system 260 outputsthe pixel values as analog signals and the signals are input to theimaging control interface 140, which includes a framegrabber, or thelike, that is suitable for converting the analog pixels values todigital pixel values. In various exemplary embodiments of this type, thecamera system 260 is implemented using a Pulnix TM-6705AN Camera,commercially available from JAI Pulnix, Inc., 1330 Orleans Dr.,Sunnyvale, Calif. 94089 USA, or a CCD camera having similar and/orsufficient capabilities according to this invention. In variousexemplary embodiments, such components are used in combination and withvarious other components disclosed herein, including the strobe lightcontroller described with reference to FIG. 5, to provide high speed andhigh precision auto focus systems and methods according to thisinvention.

In various exemplary embodiments, the control system portion 100 isfurther usable to automatically inspect workpiece features in suchworkpiece inspection images, and to store and/or output the inspectionresults. In various exemplary embodiments, the workpiece inspectioninstructions are encoded by the workpiece part programming generatingcircuit, routine or application 155 and transmitted to other componentsas needed, through data and/or control busses and/or applicationprogramming interfaces 195.

In various exemplary embodiments, when a user uses the machine visioninspection system 10 to create at least a portion of a workpiece imageinspection program for the workpiece 20 according to this invention, theuser generates workpiece program instructions either by explicitlycoding the instructions automatically, semi-automatically, or manually,using a workpiece programming language, or by generating theinstructions by moving and/or controlling the machine vision inspectionsystem 10 through an image inspection training sequence such that theworkpiece part program generating circuit, routine or application 155generates workpiece program instructions that capture operations andsettings determined according to the training sequence. In variousexemplary embodiments according to this invention, certain auto focusoperations and settings are determined by auto focus operationsdetermining circuit, routine of application 170, and incorporated intothe generated workpiece program instructions. In various exemplaryembodiments, the operation of the auto focus operation determiningcircuit, routine of application 170 is merged and/or indistinguishablefrom the operation of the workpiece part program generating circuit,routine or application 155. In various exemplary embodiments, theseinspection instructions, when executed by the part program executingcircuit, routine or application 165, will cause the machine visioninspection system 10 to automatically perform various inspectionoperations on the image.

In various exemplary embodiments, one or more of the various operationsdescribed above is repeated for multiple images in a set of images usedto inspect a workpiece 20. In various exemplary embodiments, variousknown or later developed machine vision system “tools” are stored in thememory portion 130, as previously described. In various exemplaryembodiments, these tools are used in performing one or more of thevarious foregoing manual or training sequence operations. A few examplesof video tools usable for various workpiece imaging and/or inspectionoperations are disclosed in U.S. patent application Ser. Nos.09/736,187, 09/921,886, and U.S. Pat. No. 6,542,180, each of which isincorporated herein by reference in its entirety.

Additional exemplary known tools and methods usable for determining autofocus settings and for performing auto focus operations to obtain adesired focus state for an inspection image are evident in commercialmachine vision inspection systems such as the QUICK VISION™ series ofvision inspection machines, the associated QVPAK™ software, and therelated incorporated documentation as discussed above. Such toolsinclude various exemplary graphical region-of-interest indicatingwidgets, user interfaces, and training mode menu elements and behavior,that are usable in various exemplary embodiments of the systems andmethods according to this invention. Such graphical region-of-interestindicating widgets, user interfaces, and training mode menu elements andbehavior are incorporated herein by reference.

As previously mentioned, in various exemplary embodiments of the systemsand methods according to this invention, in order to control thephysical movements of the machine vision inspection system 10, themotion control subsystem 145 receives position information from the X, Yand Z axis position encoders and transmits position altering controlsignals via data and/or control busses and/or application programminginterfaces 195. In various exemplary embodiments according to thisinvention, X, Y and Z axis position values are tracked in the motioncontrol subsystem 145 of the control system portion 100, and the motioncontrol subsystem 145 is operable to latch the position values inresponse to a control signal provided by another portion of the controlsystem portion 100.

In various exemplary embodiments according to this invention, such alatching control signal is provided to the motion control subsystem 145in relation to the effective exposure time of a corresponding auto focusimage. In various exemplary embodiments, at least the correspondingZ-axis value is then latched and stored by the control system portion100 in relation to that auto focus image, for subsequent use indetermining an estimated best focus position according to thisinvention.

In various exemplary embodiments, one or more of the previouslydescribed operations are performed by a motion control subsystem 145that includes a Galil motion control card #DMC-1730, commerciallyavailable from Galil Motion Control, Inc., of Rocklin, Calif., or amotion control card having similar and/or sufficient capabilitiesaccording to this invention. In various exemplary embodiments, suchcomponents are used in combination with one or more other componentdisclosed herein, including the strobe light controller described withreference to FIG. 5, to provide high speed and high precision auto focussystems and methods according to this invention.

In various exemplary embodiments of the systems and methods according tothis invention, the lighting system driver/controller 150 controls anddrives the illumination of the machine vision inspection system 10. Invarious exemplary embodiments, the illumination system operates toprovide relatively continuous illumination. Relatively continuousillumination is particularly suitable for manual operations and trainingmode operations of the machine vision inspection system 10. In variousother exemplary embodiments, the illumination system operates to providea strobe illumination capability. In various other exemplaryembodiments, the illumination system operates to provide both continuousillumination and strobing capability through the same light sources. Invarious exemplary embodiments, the lighting system driver/controller 150controls and drives the illumination. In various exemplary embodimentsaccording to this invention, the lighting system driver/controller 150includes the strobe light control system 500, described below withreference to FIG. 5.

In various exemplary embodiments, the auto focus operation determiningcircuit, routine or application 170 exchanges data and/or controlsignals with one or more other elements of the control system portion100. In various exemplary embodiments, this is done in order todetermine a desirable combination of auto focus image acquisitionoperations and/or settings corresponding to a desirable combination ofauto focus speed and accuracy for determining an estimated best focusposition for a region of interest of a workpiece in approximately theshortest practical time that can provide the desired precision for theestimated best focus position.

For example, in various exemplary embodiments, the systems and methodsaccording to this invention determine compatible and/or interrelatedoperations and settings related to three auto focus parameters orcharacteristics that control how rapidly an auto focusing operationaccording to this invention is performed. In various exemplaryembodiments, these auto focus parameters are the size of a region ofinterest for the auto focus operation, the rate at which the auto focusimages are acquired, and the speed at which the camera scans along theZ-axis direction while acquiring auto focus images.

In various exemplary embodiments, the location and size of the region ofthe interest is based in particular on a specific operator input, forexample, corresponding to the location and size of the region ofinterest indicating portion of a GUI auto focus tool widget that islocated and sized by an operator. Some exemplary GUI auto focus toolsand auto focus tool GUI widgets and regions of interest are discussedbelow with reference to FIGS. 8-11.

It should be appreciated that, in various exemplary embodiments, an autofocus tool according to this invention, in addition to various GUIelements and widgets associated with the tool, includes underlyingmenus, methods, operations, and settings, that respond to user inputand/or automatically determine and provide various operations and/orsettings that simplify the definition and performance of various autofocus operations for a user of the machine vision inspection system.Thus, in various exemplary embodiments according to this invention, theportion of the user-defined region of the interest that is actually usedto determine the corresponding estimated best focus position is adjustedand/or minimized semi-automatically or automatically by variousoperations associated with the auto focus tool. For example, in variousexemplary embodiments, the portion of the user-defined region of theinterest that is actually used for auto focus operations is determinedsuch that it both overlaps with an operable reduced readout pixel set ofthe camera that enables a high auto focus image acquisition rate andprovides a sufficient number of pixels to determine the correspondingestimated best focus position with a desired level of accuracydetermined by an operator input or a default accuracy level. Suchoperations are described in greater detail further below.

In various exemplary embodiments, the control system portion 100includes respective default values for the size of the region ofinterest, or portion of the region of interest, that is actually usedfor auto focus operations corresponding to respective desired levels ofaccuracy specified by an operator. In various exemplary embodiments, thedefault values are established empirically, based on experience with avariety of workpieces, or analytically. In various exemplaryembodiments, the auto focus operation determining circuit, routine orapplication 170 then applies the default values when defining operationsand settings related to an auto focus region of interest defined by anoperator. For example, in various exemplary embodiments, the region ofinterest indicating portion of a GUI auto focus tool widget is locatedand nominally sized by an operator and a desired accuracy mode isselected by the operator. Then, in various exemplary embodiments, theauto focus operation determining circuit, routine or application 170determines the actual operational pixel set within the nominal autofocus region of interest indicated by the operator, based on theselected auto focus accuracy mode and an operational reduced readoutpixel set of the camera, as outlined above.

As previously mentioned, in various exemplary embodiments, in additionto providing a full pixel set corresponding to a full field of view, thecamera system 260 is operable to select at least one reduced readoutpixel set within the camera frame. In various exemplary embodiments, theat least one reduced readout pixel set includes a central band of 100rows of pixels, a band of rows of pixels that has a selectable variablelocation and or span, a centrally-located 100×100 range of contiguous(i,j) pixels, a selectable 100×100 range of contiguous (i,j) pixels thathas a variable location, or a fully selectable set of contiguous (i,j)pixels, or the like.

It should be appreciated that, in various exemplary embodiments, when areduced readout pixel set is selected for operation, the time that ittakes to output the reduced readout pixel set from the camera is shorterthan the time that it takes to output a full pixel set of the camera.Therefore, the overall repetitive image acquisition rate of the camerasystem 260 is faster, compared to repetitive image acquisition rateassociated with the full field of view of the camera. For example,various exemplary embodiments incorporating the Redlake camera providean image rate of approximately 125 images per second when the full frameis output from the camera, and an image rate of approximately 350 imagesper second when a reduced readout pixel set of 100×100 pixels is outputfrom the camera. Furthermore, for various cameras usable according tothis invention, other factors being equal, as the size of the reducedreadout pixel set is reduced, the overall repetitive image acquisitionrate of the camera system 260 increases, as described below withreference to FIG. 13.

The term reduced readout pixel set is used herein to emphasize that, fora variety of cameras usable for the camera system 260, a full field ofimage is captured or acquired by the camera system 260 “in parallel”,and therefore this image capture or acquisition time is not sensitive tothe number of pixels values captured. In contrast, typically, the timeassociated with outputting pixels values from the camera system 260,where pixel values are typically serially output to the control systemportion 100, does depend on the number of pixel values output, and isone of the larger time factors that limit the repetitive imageacquisition rate that can be provided by the camera system 260. However,it should be appreciated that in various exemplary embodiments, sinceonly the reduced readout pixel set is actually operational in variousauto focus operations according to this invention, the camera system 260optionally, but not necessarily, is operated to restrict other cameraoperations, such as image capture operations or the like, to the reducedreadout pixel set.

In various exemplary embodiments, based on an established size of thereduced readout pixel set (and possibly its position relative to thecamera frame), and known camera operating characteristics and the like,the auto focus operation determining circuit, routine or application 170determines an operational rate of auto focus image acquisition, that is,the operational timing between the acquisition of auto focus images. Invarious exemplary embodiments, a default maximum free-running repetitiveimage acquisition rate of the camera, based on the established reducedreadout pixel set, is used. In various other exemplary embodiments, theauto focus operation determining circuit, routine or application 170determines a rate less than the maximum free-running repetitive imageacquisition rate, and that determined rate is implemented by the imagecontrol interface 140.

In various exemplary embodiments, based on an established operationaltiming between the acquisition of auto focus images, and a desired autofocus curve sampling density as outlined below with reference to FIGS. 3and 4, the auto focus operation determining circuit, routine orapplication 170 determines a desired maximum or practical maximum motionspeed along the Z-axis direction, during the acquisition of auto focusimages. In various exemplary embodiments, the auto focus operationdetermining circuit, routine or application 170 then defines any othermotion operations and/or settings that are needed to complete thedefinition of a motion that is used for run mode auto focus operations.Similar to the determination of the portion of the region of interestthat is actually used for auto focus operations, in various exemplaryembodiments, the desired auto focus curve sampling density is determinedcorresponding to the desired level of accuracy specified by an operator,as described in greater detail below with reference to FIGS. 3, 4 and14.

It should be appreciated that, in various exemplary embodiments, thepractical maximum Z-axis speed is further limited by the allowableamount of auto focus image blur-ambiguity due to the Z-axis motionduring the effective exposure period of an auto focus image. That is, asthe focus distance changes during an exposure, it is not possible todetermine what focus specific distance contributed most or all of anyout-of-focus or blurred characteristics of the acquired image. Thus, invarious exemplary embodiments, the camera system 260, or a strobeillumination system, is used to sufficiently limit the effectiveexposure duration of the auto focus images, such that the focuscharacteristics of the acquired image correspond to a specific focusdistance to a desired level of accuracy.

In various exemplary embodiments, based on an established operationalmaximum Z-axis speed during the acquisition of auto focus images, and adetermined limit for the amount of Z-axis displacement that is allowableduring an effective exposure duration of the auto focus images, theeffective exposure duration of the auto focus images is also determinedby the auto focus operation determining circuit, routine or application170. In various exemplary embodiments, when this effective exposureduration is within the exposure control capabilities of the camerasystem 260, an appropriate continuous illumination power level is usedduring the auto focus image acquisition and the camera system 260 iscontrolled to provide the determined effective exposure duration.

In various exemplary embodiments, a typical general-purpose precisionmachine vision inspection system is operated approximately according tothe principles of this invention outlined above, with a lensconfiguration providing a depth of field of approximately 14 microns anda magnification of 2.5 of a typical machined metal workpiece surface, anauto focus region of interest size of 100×100 pixels, an operativeimaging rate of approximately 222 auto focus images per second, andcontinuous illumination, is able to auto focus to provide an estimatedbest focus position in approximately 1.2 seconds, with a repeatabilitybetter than 0.2 microns, or less than approximately 2% of the depth offield of the lens configuration, for repeated auto focus trials using amaximum auto focus image spacing of approximately 5-6% of the depth offield of the lens configuration. In various exemplary embodiments, whena maximum auto focus image spacing of approximately 100% of the depth offield of the lens configuration is used, allowing fewer auto focus imageacquisitions and/or a faster Z-axis scan motion speed, the systems andmethods according to this invention are able to auto focus to provide anestimated best focus position in approximately 0.5 seconds, with arepeatability better than 1.7 microns, or less than approximately 15% ofthe depth of field of the lens configuration, for repeated auto focustrials. Various considerations with respect to auto focus image spacingand the accuracy of an estimated best focus position are described belowwith reference to FIGS. 3 and 4.

In various exemplary embodiments, when an effective exposure duration isnot within the exposure control capabilities of the camera system 260and a strobe illumination system is included in the machine visioninspection system 10, the lighting system driver/controller 150 and/orthe strobe illumination system is/are controlled to provide thedetermined effective exposure duration and a corresponding strobeillumination power level.

It will be appreciated that, in various exemplary embodiments, aparticular effective exposure time generally requires a particularillumination intensity or power level in order to provide a desirableoverall intensity level for the acquired auto focus images. Thus, invarious exemplary embodiments, during a training mode operation, anoperator establishes a desired configuration of the various lights 220,230, and or 240, using continuous illumination and a default, known orstandard effective exposure time provide by the camera, for example.

In various exemplary embodiments, the continuous illumination isadjusted to a desired intensity or power level manually,semi-automatically or automatically, to provide a desirable imagecharacteristic in a workpiece image that is acquired with a default,known or standard camera integration period. It will be appreciated thatcontinuous illumination is more practical and easier for an operator touse for a variety of manual operations performed during a training modeof operation.

In various exemplary embodiments, at least during a run mode of autofocus operation, the desired configuration of lights alternativelyoperates using a strobe lighting capability, for example, provided asoutlined below with reference to FIG. 5. In such various exemplaryembodiments, the control system portion 100 includes various calibrationfactors, conversion factors, look up tables, or the like, that areusable by the auto focus operation determining circuit, routine orapplication 170 to determine an intensity or power level to be used withthe effective exposure duration established for the strobe illuminationsystem. In various exemplary embodiments, this provides the same totalimage exposure that is provided by the known continuous illuminationintensity or power level established in conjunction with the default,known or standard camera integration period used during the trainingmode of operation, as outline above.

In various exemplary embodiments, a known light source continuous powerlevel times the known or standard camera integration period establishesa total exposure illumination energy for that light source. In variousexemplary embodiments, to establish an operational strobe illuminationpower level for that light source, the total exposure illuminationenergy is divided by the effective exposure duration established for thestrobe illumination system, and the strobe illumination power level forthat light source is set accordingly. It should be appreciated that, invarious exemplary embodiments, actual control levels for a strobed lightsource are adjusted for various practical operating characteristics ofthe light source and/or various associated optical and electroniccomponents. Appropriate adjustments will generally be relatively stableover time, and may therefore be established initially and/orperiodically by analysis and/or experiment for a particular type oflight source and controller, in various exemplary embodiments.

In various exemplary embodiments, the region of interest focus valuedetermining and comparing circuit, routine or application 175 determinesa focus value for at least an operative portion of a region of interestin an auto focus image or other image obtained by the camera system 260and stored in memory 130. The focus value is indicative of the degree offocus provided in that portion of the image. In various exemplaryembodiments, the region of interest focus value determining andcomparing circuit, routine or application 175 also compares differentfocus values determined for the region of interest in multiple images.Thus, in various exemplary embodiments, the region of interest focusvalue determining and comparing circuit, routine or application 175 alsodetermines the one of the auto focus images that provides the best focusin the region of interest.

FIG. 3 is a representative graph illustrating a focus curvecorresponding to a set of focus value points 301 that are denselysampled, that is, at a relatively large number of locations along theZ-axis. FIG. 4 is a representative graph illustrating a focus curvecorresponding to a set of focus value points 401 that are sparselysampled, that is, at a relatively small number of locations along theZ-axis. As previously described, and as further described hereinafter ingreater detail, various exemplary embodiments of the systems and methodsaccording to the invention enable the implementation of a denselysampled focus curve in connection with a relatively more accurate autofocus operation and the implementation of a sparsely sampled focus curvein connection with a relatively less accurate auto focus operation. Invarious exemplary embodiments, this is done in order to provide adesirable combination of auto focus speed and accuracy that is adaptedto a particular workpiece inspection image or a particular application.

The focus value on the Y-axis of FIG. 3 generally corresponds to thequality of the focus of a feature included in the operational auto focusregion of interest of a corresponding auto focus image. A focus valuehigher on the Y-axis corresponds to a better focus of the feature in theauto focus region of interest. A focus value lower on the Y-axiscorresponds to a worse focus of the feature in the auto focus region ofinterest. The focus curve typically approximates the shape of a bellcurve. Thus, the focus values obtained for focusing distances greaterthan, and for focusing distances less than, the ideal focal length, willbe lower than the focus value for the ideal focal length. Thus, the autofocus search for a best focus position corresponds to a search for thetrue peak of the true bell-shaped focus curve.

It should be appreciated that the auto focus operations described hereinprovide focus value “sample” data that is used to estimate the truefocus curve and the corresponding best focus position to a desired orsufficient level of accuracy. Thus, when a relatively lower level ofaccuracy is sufficient and/or a relatively faster set of auto focusoperations is desired, the focus curve data is more sparsely sampled,that is, the operable spacing along the Z-axis between various autofocus images is larger. In such cases, the estimated best focus positionis a relatively more approximate estimate of the true peak of the focuscurve. Conversely, when a relatively higher level of accuracy isrequired, the focus curve data is more densely sampled, that is, theoperable spacing along the Z-axis between various auto focus images issmaller. In such cases, the estimated best focus position is arelatively less approximate, or more accurate, estimate of the true peakof the focus curve.

After determining the estimated position of a peak of a focus curve, thecorresponding Z-axis position, depicted on the horizontal axis of FIGS.3 and 4, represents the Z-axis position that is the estimated best focusposition that adequately corresponds to a sufficiently focused orbest-focused image of the feature in the corresponding region ofinterest on the workpiece. In general, in various exemplary embodiments,this estimated best focus position provides a coordinate value that isused as an inspection value for the feature in the region of interestand/or as a positioning coordinate that is used to acquire an image ofthe workpiece that is best used to determine various dimensions andother inspection results for that feature in the region of interest.

A variety of focus value functions, also referred to as focus metricsherein, are usable in various exemplary embodiments according to thisinvention. In various exemplary embodiments, the feature included in theoperational auto focus region of interest is an edge, and a suitableedge focus metric is used, as described in greater detail below withreference to FIG. 8. In various other exemplary embodiments, the featureincluded in the operational auto focus region of interest is simply theportion of the workpiece surface defined by that region of interest, anda suitable surface focus metric is used, as described in greater detailbelow with reference to FIG. 8. Surface focus metrics generally providefocus values that correspond to a measurement of contrast in the autofocus region of interest in an auto focus image. One exemplary surfacefocus metric is described below with reference to Equations 1-3. Variousalternative surface focus metrics are also described in detail in theincorporated references, and various suitable focus value functions willalso be known to one of ordinary skill in the art. Thus, such functionsneed not be further described herein.

As previously mentioned, the auto focus operations described hereinprovide focus value “sample” data that is used to estimate the truefocus curve and to estimate the true focus curve peak locationcorresponding to a best focus position, within a desired or sufficientlevel of accuracy. As previously mentioned, the true focus curve and thetrue focus curve peak location is generally estimated with betteraccuracy and repeatability for a more densely sampled focus curve thanfor a more sparsely sampled focus curve. It should also be appreciatedthat, the focus curve sampling density, that is, the operable spacingalong the Z-axis between various auto focus images, is determined by theauto focus image acquisition rate of the camera system 260 incombination with the motion speed along the Z-axis during the auto focusimage acquisition sequence, in a manner that will be apparent to one ofordinary skill in the art. These factors have been previously discussedwith reference to the auto focus operation determining circuit, routineor application 170.

FIG. 3 shows a dimension 302 that represents the full-width-half-maximumdimension, or FWHM, of the focus curve of FIG. 3. FIG. 4 shows ananalogous dimension 402 that represents the full-width-half-maximumdimension, or FWHM of the focus curve of FIG. 4. Also shown for purposesof illustration in FIG. 3 is a dimension 303, which represents the depthof field, or DOF, of the lens configuration corresponding to the focuscurve of FIG. 3. In various exemplary embodiments, the depth of field isdetermined according to one conventional expression based on thenumerical aperture (NA) of the lens configuration. For the exemplaryembodiment shown in FIG. 3, the FWHM 302 of the focus curve isapproximately 3.25 times the DOF 303 of the underlying lensconfiguration. FIG. 4 shows an analogous DOF dimension 403 thatrepresents the DOF of the lens configuration corresponding to the focuscurve of FIG. 4. Thus, the DOF of a particular lens configuration, theNA of the lens configuration and the FWHM of the corresponding focuscurve are all approximately related in a relatively predictable andapproximately constant set of relationships.

Thus, in various exemplary embodiments according to this invention, fora given desired accuracy mode or level, the operable maximum spacingalong the Z-axis between various auto focus images, which is related tothe minimum focus curve sampling density, is determined based on thedesired accuracy mode or level, in combination with a lenscharacteristic of the operative or current lens configuration. Invarious exemplary embodiments, the lens characteristic is a direct lenscharacteristic such as the DOF or NA of a lens, or an indirect lenscharacteristic, such as a width dimension of the expected resultingfocus curve, such as the FWHM, or the like.

In various exemplary embodiments, when the auto focus operations tool isoperated in a low accuracy mode, the auto focus operations and/orsettings are determined such that the maximum spacing along the Z-axisbetween various auto focus images is at least 0.2 times the FWHM of theexpected nominal focus curve width for a current lens configuration.This allows fast motion during auto focus operations. In various otherexemplary embodiments, when the auto focus operations tool is operatedin a low accuracy mode, the maximum spacing along the Z-axis betweenvarious auto focus images is up to 0.5 times the FWHM. This allows evenfaster motion during auto focus operations while providing sufficientaccuracy for a variety of low accuracy auto focus applications.

In various other exemplary embodiments, similar maximum spacings aredetermined directly from the NA of a current lens configuration when theauto focus operations tool is operated in a low accuracy mode, the autofocus operations and/or settings are determined such that the maximumspacing in microns along the Z-axis between various auto focus images isat least 0.18/NA² and at most 0.45/NA² for the NA of a current lensconfiguration. In various exemplary embodiments according to thisinvention, the settings or parameters outlined above provide anestimated best focus position with an accuracy on the order of 5%-15% ofthe DOF of the corresponding lens configuration. For relatively highmagnification lenses, the accuracy in terms of the DOF tends to be atthe larger end of this percentage range, which still providesmicron-level accuracy due to the small DOF of such lenses, which may beon the order of a few microns or less for a high magnification lens.Conversely, for relatively low magnification lenses, for example 1-2.5times magnification or the like, the accuracy in terms of the DOF tendsto be at the smaller end of this percentage range, which providesexcellent accuracy on the order of a few microns, despite the relativelylarge DOF of such low magnification lenses, which may be on the order ofapproximately 10 to 100 microns.

In various exemplary embodiments, when the auto focus operations tool isoperated in a higher accuracy mode, the auto focus operations and/orsettings are determined such that the maximum spacing along the Z-axisbetween various auto focus images is at most 0.1 times the FWHM of theexpected nominal focus curve width for a current lens configuration.This sacrifices some motion speed and increases the overall auto focustime in order to provide denser focus curve sampling and a significantlybetter estimate of the best focus position. In various exemplaryembodiments, when the auto focus operations tool is operated in a higheraccuracy mode, the auto focus operations and/or settings are determinedsuch that the maximum spacing along the Z-axis between various autofocus images is at least 0.02 times the FWHM. This further sacrificesmotion speed and further increases the overall auto focus time in orderto provide an estimated best focus position accuracy that isapproximately the best achievable accuracy for a variety of highaccuracy auto focus applications.

In various other exemplary embodiments, when the auto focus operationstool is operated in a higher accuracy mode, the auto focus operationsand/or settings are determined such that the maximum spacing in micronsalong the Z-axis between various auto focus images is at least 0.018/NA²and at most 0.09/NA² for the NA of a current lens configuration. Invarious exemplary embodiments according to this invention, the settingsor parameters outlined above provide an estimated best focus positionwith an accuracy on the order of 0.5%-5% of the DOF of the correspondinglens configuration. For relatively high magnification lenses, theaccuracy in terms of the DOF tends to be at the larger end of thispercentage range. This still provides micron or sub-micron levels ofaccuracy and repeatability due to the small DOF of such lenses, whichmay be on the order of a few microns or less for a high magnificationlens. Conversely, for relatively low magnification lenses, for example1-2.5 times magnification or the like, the accuracy in terms of the DOFtends to be at the smaller end of this percentage range. This providesexcellent accuracy on the order of a few microns or less, despite therelatively large DOF of such low magnification lenses, which may be onthe order of approximately 10 to 100 microns.

It should be appreciated that both the particular lens characteristicsand the particular values of the maximum spacing along the Z-axisdescribed for the foregoing exemplary embodiments are illustrative only,and not intended to be limiting. Various other lens characteristics andapplicable values for the maximum spacing that are appropriate forvarious machine vision systems, applications, and accuracy levels,should be apparent.

In various exemplary embodiments of the systems and methods according tothis invention, a two-pass set of auto focus operations is used toincrease the robustness of the auto focus operation for unexpectedworkpiece variations and the like, while preserving a desirablecombination of auto focus speed and accuracy. The first pass is designedto be as fast as possible over a total first pass Z-axis position range,or first pass auto focus image range, also called a focus image rangeherein, that is certain to include the best focus position, includingvariations or tolerances for the nominal Z-axis location of the regionof interest on the workpiece, as well as any additional variations ortolerances for the nominal Z-axis positioning of the workpiece stage, tothe extent that such positioning variations are not eliminated bypreliminary operations that establish an adjusted workpiece coordinatesystem, or the like. In general, in various exemplary embodimentsaccording to this invention, the total first pass auto focus image rangeis defined such that it is centered about a nominal Z-position that hasbeen determined manually by an operator, or semi-automatically, orautomatically based on various lens parameters, workpiece CAD data andthe like, to provide an approximately focused region of interest. Invarious exemplary embodiments, the total first pass auto focus imagerange is further defined with due consideration to the depth of focus ofa current lens, and the previously discussed positional tolerances ofthe workpiece auto focus region of interest, and the like. In variousexemplary embodiments, the total first pass auto focus image range is onthe order of 1-4 mm, most of which is attributed to potential workpieceand region of interest position variations, particularly when highermagnification lenses are used, because such lenses typically have a DOFwhich is on the order of microns and is therefore typically negligiblein comparison to the potential workpiece region of interest positionvariations.

In anticipation of a second pass described below, in various exemplaryembodiments, the first pass only needs to support a very approximateestimate of the best focus position. Thus, the focus curve is sparselysampled during the first pass auto focus operations, for example,approximately corresponding to FIG. 4, or as described for the lowaccuracy mode above, with due consideration to the depth of field, orother lens characteristic, of the current lens. In various exemplaryembodiments, the location of the peak of the focus curve is thenestimated to provide an estimated best focus position that is anapproximate value usable for refining a second pass focus image range torapidly determine a refined estimate of the best focus position.

In various exemplary embodiments, the second pass is designed to providea desired refined or final level of accuracy when determining theestimated best focus position. Thus, during the second pass auto focusoperations in these various exemplary embodiments, the focus curve ismore densely sampled over a much shorter second pass auto focus imagerange, for example, in various exemplary embodiments, over a range of2-5 times the DOF, in the vicinity of the nominalapproximately-estimated best focus position that was determined based onthe first pass auto focus image data. For example, the second passsample density approximately corresponds to FIG. 3, or as described forthe higher accuracy mode above, with due consideration to the desiredaccuracy and the depth of field, or other lens characteristic of thecurrent lens, in these various exemplary embodiments. The location ofthe peak of the focus curve, that is, the best focus position, is thenestimated to the desired level of accuracy based on the second pass autofocus image data in various exemplary embodiments.

It should be appreciated that, in various exemplary embodiments, theestimated best focus position determined by auto-focusing is either usedto directly determine the height along the Z-axis direction that is usedas an inspection dimension for a surface in the region of interest, orto position the camera along the Z-axis to maximize the sharpness of anedge in the image plane prior to edge detection, or the like, or both.

It should be appreciated that, in various exemplary embodiments of thesystems and methods according to this invention, a strobe lightingcapability is employed to limit the effective exposure duration and anyrelated blur-ambiguity of various auto focus images as previouslydescribed with reference to the operations of the auto focus operationdetermining circuit, routine or application 170. As previously outlined,the X, Y and Z position values associated with a particular auto focusimage are, in various exemplary embodiments, based on position encodersignals tracked by the motion control subsystem 145.

In various exemplary embodiments, the relative position between thecamera and stage or workpiece that corresponds to the various auto focusimages used to estimate the best focus position must be known with highreliability and with high precision. Accordingly, in various exemplaryembodiments according to this invention, at least the Z-axis positionvalue is latched in the motion control subsystem 145 with a knownrelation to the effective time of the exposure of the correspondingimage, and stored in relation to that image. Accordingly, in variousexemplary embodiments, when continuous motion is used during auto focusimage acquisition, it is advantageous to use strobe lighting and to bothtrigger the strobe lighting and latch the corresponding position valuesat a specific time in relation to the strobe lighting duration, forexample, in relation to the strobe lighting trigger. In variousexemplary embodiments, this is all initiated and repeated under controlof the control system portion 100 at specific times when the systemconfiguration corresponds to auto focus image locations that provide adesired auto focus image spacing along a desired auto focus image range.

In various other exemplary embodiments, this is all initiated by thecontrol system portion 100 when the Z-axis position is at one end of theoperative focus image range, and repeated throughout the focus imagerange according to a maximum free-running rate or repetitive timingdetermined by the imaging control interface 140 and/or the camera system260, so as to provide a corresponding set of auto focus images that arewithin a desired maximum focus image spacing throughout the operativefocus image range. In various exemplary embodiments, the set of autofocus images are terminated based on a determined number of imagerepetitions, or a detected position at or beyond the end of the focusimage range. Various considerations related to typical vision systemcomponents regarding high speed imaging, imaging moving objects,synchronization issues, and the like, are discussed in detail in “HighSpeed, Real-Time Machine Vision”, by Perry C. West, Automated VisionSystems Inc., www.autovis.com, 2001, commissioned byCyberOptics-Imagenation, www.imagenation.com, which is herebyincorporated by reference in its entirety.

FIG. 5 is a schematic diagram showing one exemplary embodiment a strobelight control system according to this invention. In various exemplaryembodiments, the strobe light control system 500 includes a continuousillumination control capability. In various exemplary embodiments, thestrobe light control system 500 is included in the lighting systemdriver/controller 150. In various exemplary embodiments, the lightcontrol system 500 is implemented using generally known conventionalcircuit elements and conventional circuit design techniques. In variousexemplary embodiments, the components of the light control system 500are selected to provide a high-speed, feedback-controlled current drivercapable of operating a current source for a light source such as an LED,or diode laser, or the like, at rates as high as 5 MHz and higher. Invarious exemplary embodiments, the components are selected to provide aninduced phase delay that is approximately 1 microsecond or less; thatis, the strobe pulse is initiated within approximately 1 microsecondafter receiving the leading edge of the input control signal EXP 2. Invarious exemplary embodiments, the components are selected to providepeak currents as high as approximately 1.5 A for a strobe mode strobeduration as short as 500 nsec and as long as 40 msec.

Thus, as shown in FIG. 5, in various exemplary embodiments the lightcontrol system 500 includes a light source 580 such as any of thelighting devices 220, 230 or 240, that is capable of providing highintensity strobed illumination. In various exemplary embodiments, thelight source 580 includes an LED, as previously discussed. Afast-response medium power transistor 575, capable of providing, forexample, approximately 1.5 A (2 A peak), is connected to drive the lightsource 580 according to a control signal AA. The light source 580provides a feedback control signal 583 that corresponds to the outputpower of the light source 580. In various exemplary embodiments, thefeedback control signal 583 may be generated from a portion of the lightfrom the light source 580. The feedback control signal 583 is providedto a buffer circuit portion 585 that, in various exemplary embodiments,senses, and/or amplifies or scales the feedback control signal 583 toprovide the feedback control signal BB.

In various exemplary embodiments, the light control system 500 isoperated in two separate modes. In a strobe mode, a control signal EXP 2is input to a high speed input buffer 505. The signal EXP 2 is generatedby and output from a framegrabber included in the imaging controlinterface 140, as described below. A multiplexer 512 is controlled byone or more mode select signals from the controller 120, imaging controlinterface 140, or other component of the control system portion 100,over one or more signal lines to route the control signal EXP 2 to ahigh speed difference amplifier 515. The difference amplifier 515 alsoreceives the feedback control signal BB from the buffer circuit portion585. A difference signal is output by the difference amplifier 515 to ahigh speed amplifier 525 that amplifies or scales the difference signalto provide the control signal AA that is input to the medium powertransistor 575 to drive the light source 580 in a strobe mode.

In a continuous illumination mode, a “DAC IN” control signal is input toan input buffer 510. The DAC IN signal is generated by and output fromthe controller 120 in various exemplary embodiments. The multiplexer512, controlled by the one or more mode select signals from thecontroller 120 routes the DAC IN control signal to a differenceamplifier 520. The difference amplifier 520 also receives the feedbackcontrol signal BB from the buffer circuit portion 585.

A difference signal is output by the difference amplifier 520 to anamplifier 530 that amplifies or scales the difference signal to providethe control signal AA that is input to the medium power transistor 575to drive the light source 580 in a continuous illumination mode. In thecontinuous illumination mode, the control signal AA is controlled belowa maximum level that controls the current in the medium power transistor575 and light source 580 at a level that provides a long operating lifefor those components.

By having two such separate operating modes, the strobe light controlsystem 500 can be used to retrofit legacy vision inspection machines 10,and can be used in other applications where it is desirable to operate aprecision machine vision inspection system using systems and methodsaccording to this invention both with and without strobe lighting, aswell as conventional systems and methods that use relatively continuousillumination that is typically controlled by a signal such as the DAC INsignal. It should be appreciated that, by having two such separateoperating modes, the strobe light control system 500 is particularlyuseful for providing continuous illumination during various manualoperator-directed training mode operations and providing a strobeillumination that provides a total exposure illumination energy similarto that provided during the various training mode operations duringvarious automatic run mode operations used in various exemplaryembodiments of systems and methods according to this invention.

In order to both trigger the strobe lighting and to latch thecorresponding position values at a specific time in relation to thestrobe lighting duration, these system elements described above areoperably interconnected in the control system portion 100. Operationalsteps associated with the strobe mode of operation are described belowin connection with the run-time operational method of the invention.

FIG. 6 is a flowchart outlining one exemplary embodiment of a learn modeof training mode method for determining operations and settings forautomatically focusing on a region of interest of a workpiece accordingto this invention in run mode. The method starts at step S100 andcontinues to step S110, where the vision inspection system is placedinto a learn mode. Then, in step S120, a current lens for the camera isselected. Next, in step S130, the workpiece to be evaluated ispositioned at a desired location so that the portion of the workpiece tobe inspected is in the field of view of the camera. Operation thencontinues to step S140.

In step S140, the illumination on the workpiece is set. It should beappreciated that the illumination can be set by the user or can be setsemi-automatically or automatically. In various exemplary embodiments, acontinuous illumination is set. Next, in step S150, a working view ofthe workpiece is obtained based on the set illumination. In variousexemplary embodiments, the portion of the workpiece visible in theworking view is a function of the position at which the workpiece hasbeen placed.

In various exemplary embodiments, the working view of the workpiece thatis obtained based on the set illumination includes a working view imageacquired using a strobe lighting duration short enough to provide anacceptable auto focus image when used in combination with any practicalZ-axis speed during an auto focus image acquisition sequence. In variousexemplary embodiments in which a continuous illumination is set in stepS140, strobe illumination parameters are derived from the continuousillumination settings.

Then, in step S160, the working view obtained from the camera isevaluated to determine whether or not the illumination is satisfactory.If the illumination is not satisfactory, operation continues to stepS170. Otherwise, operation jumps to step S180.

In step S170, the illumination settings are refined, for example, basedon the operator modifying various illumination settings. Operation thenreturns to step S150. In contrast, in step S180, the currentillumination settings are stored. Operation then continues to step S190.In step S170, if the unsatisfactory illumination is too faint, then theillumination is increased in intensity. In contrast, if theunsatisfactory illumination is too bright, then the illumination isdecreased in intensity.

In various exemplary embodiments, the systems and methods according tothis invention determine three compatible and/or interrelated auto focuscharacteristics or variables, and/or their associated control parametersor settings, that control how rapidly an automatic focusing operationaccording to this invention can be performed. In various exemplaryembodiments, these characteristics are the size of an auto focus regionof interest for the auto focus operation, the rate at which the autofocus images are acquired, and the maximum speed at which the camerascans along the Z-axis while acquiring auto focus images.

It should be appreciated that, in various exemplary embodiments, inorder to establish a desirable combination of high speed and highaccuracy auto focus according to this invention, these three variablesor characteristics are determined in an interrelated manner. In variousexemplary embodiments, this is done in order to determine a desirablecombination of auto focus image acquisition operations and/or settingscorresponding to a desirable combination of auto focus speed andaccuracy for determining an estimated best focus position inapproximately the shortest practical time that can provide the desiredprecision for estimated best focus position. In various exemplaryembodiments, there are various tradeoffs and relationships between thesethree variables, as well as alternative exemplary methods and sequencesof determining their values. However, more generally, in variousexemplary embodiments, the auto focus parameter or variable that is mostseverely constrained by particular hardware limitations, or accuracyrequirements, or the like, for a particular machine vision inspectionsystem or a particular set of auto focus operations, is establishedfirst, and the other auto focus parameters or variables that are lessconstrained by such limitations and requirements are subsequentlydetermined.

Accordingly, in step S190, the value for a first one of these threevariables is defined. Then, in step S200, the value for a second one ofthese three variables is defined in view of the value of the first oneof the variables. Next, in step S210, the value for the third one of thethree variables is determined based on the defined values for the firsttwo variables. Operation then continues to step S220.

In step S220, the results provided by the set of auto focuscharacteristics or variables are confirmed by checking an auto focusresult. In various exemplary embodiments, this confirmation is providedby an auto focus demonstration that mimics the results of comparable runmode operations. That is, a set of demonstration auto focus operationsis run that is substantially similar to run mode operations determinedbased on the various learn mode operations and the associated machineconfiguration and set of auto focus characteristics or variablesdetermined during the learn mode operations. For example, a motion,strobe illumination, and image acquisition rate, are used that aresimilar or identical to those provided by run mode operations andsettings, and based on the resulting auto focus images distributed ofover a suitable total Z-axis auto focus image range, an estimated bestfocus position is determined. In various exemplary embodiments, themachine is then positioned at the estimated best focus position, anevaluation image is acquired and displayed, and the evaluation image isevaluated. In various exemplary embodiments, this is done either bymanually checking the evaluation image or by performing an inspectionoperation on the evaluation image and analyzing the results. In variousexemplary embodiments, the auto focus demonstration is initiated by theoperator using a corresponding GUI control feature.

Then, in step S230, the confirmed set of auto focus operations andsettings are recorded. Next, in step S240, the part program machinecontrol instructions corresponding to the confirmed set of auto focusoperations and settings and the any other settings used to generate theconfirmed auto focus results are generated. In various exemplaryembodiments, this data includes information regarding the dimensions ofthe region of interest, the specifications of a reduced readout pixelset, an image acquisition repetition rate, the illumination settings,which may or may not include, in various embodiments, strobe intensityand strobe duration time, Z-axis scan speed, the nominal parameters ofthe total Z-axis auto focus image range, the selected current lens, andthe like. It should be appreciated that, in various exemplaryembodiments, the operations of the steps S230 and S240 may merged and/orindistinguishable. Then, in step S250, other desired part programinstructions, if any, are generated. Next, in step S260, the learn modeis exited and the generated part program machine control instructionsare stored for future use such as, for example, during an automatic runmode.

As previously described, when positioning the workpiece in step S130,coordinates in an X-axis and a Y-axis are established for the workpiece.Further, the working view obtained in step S150 may be obtained manuallyby a user or automatically by the machine vision inspection system.

It should be appreciated that, in various exemplary embodiments, settingthe illumination in step S140 includes directly setting strobe imageparameters. In various exemplary embodiments, when strobe lighting isused to set the illumination, the strobe lighting is controlled orestablished manually by a user or is controlled or establishedautomatically. The dual area contrast tool described below in connectionwith FIG. 7 is an example of an automatic exposure evaluation tool thatis used to help establish desirable settings for either strobe orcontinuous illumination in various exemplary embodiments.

When defining the region of interest for the auto focus operation insteps S190 or S200, in various exemplary embodiments, the region ofinterest for the auto focus operation is defined using a graphical userinterface, or by direct editing through, for example, a user interfacewindow. In yet other exemplary embodiments, the region of interest forthe auto focus operation is defined by a combination of direct editingand using the graphic user interface.

It should be appreciated that in various exemplary embodiments accordingto this invention, a reduced readout pixel set, outlined previously, isdefined in conjunction with defining the region of interest. In variousexemplary embodiments, the reduced readout pixel set is definedautomatically by the control system portion 100 based on the region ofinterest defined in the learn mode operations. In various exemplaryembodiments, a GUI used during the various learn mode operationsdisplays certain location and/or size characteristics of an operablereduced readout pixel to provide an operator with visual feedback thatis useful for defining the region of interest and/or a correspondingreduced readout pixel set during various learn mode operations. Variousconsiderations regarding the relationship between a region of interestand a corresponding reduced readout pixel set in various exemplaryembodiments are discussed below with reference to FIGS. 8-11 and 13.

When defining the focus curve sample density and/or auto focus imagespacing in one of steps S190-S210, in various exemplary embodiments thedensity and/or spacing is selected or determined within a continuousrange of values. Alternatively, in various exemplary embodimentspredefined respective default values for the density and/or spacing aredetermined as discrete values associated with operator determinedsettings such as coarse versus fine, accurate versus less accurate,or/and faster versus slower.

In yet other exemplary embodiments, the focus image acquisition rate isdefined, or determined to be, one of an optimizing mode or a simplifiedmode. In an optimizing mode, for a given camera, a given amount ofcontrol over the reduced readout pixel set is provided. In general, atleast one dimension of the reduced readout pixel set determined inconjunction with the region of interest will be used to determine theauto focus image acquisition rate, that is, the image acquisition ratethat the camera is able to achieve for the reduced readout pixel setassociated with the desired region of interest. In a simplified mode,typical sets of values for the three parameters are predetermined foreach selectable lens that is used, and that constitutes low, medium andhigh accuracy for the estimated best focus position, in variousexemplary embodiments.

In still other exemplary embodiments, an auto focus tool is run in adefault mode that automatically sizes the graphical user interfaceregion of interest indicating widget of the auto focus tool tocorrespond to an assumed typical reduced readout pixel set having aknown associated image acquisition rate for the camera. In variousexemplary embodiments, the user positions the region of interestindicating widget and controls one dimension of the region of interestindependently, while the other dimension of the region of interest isautomatically functionally dependent on the characteristics of theassumed typical reduced readout pixel set.

In other exemplary embodiments, an overrule mode is included for caseswhen it is determined that the constraints on the region of interestindicating widget of the auto focus tool or the available reducedreadout pixel set configuration(s) are unacceptable for a particularfeature of the workpiece to be inspected. For example, such an overrulemode may be desirable for workpieces having a surface to be focused onwith an odd shape, such as a long narrow shape or the like. In theoverrule mode, in some exemplary embodiments, the region of interest isdefined anywhere in the full field of view of the camera, a reducedreadout pixel set is not used, and relatively slow auto focus operationsresults, as needed.

In some exemplary embodiments, when defining the scan motion and/ormaximum speed at which the camera scans along the Z-axis while acquiringauto focus images in steps S190-S210, the scan motion and/or maximumspeed is rounded off into, or selected from, discrete predeterminedspeed choices. In various other exemplary embodiments, the scan motionand/or maximum speed is determined within a continuous range of speedsavailable for the machine vision system. In various other exemplaryembodiments, the scan motion includes a default or specifiedacceleration provided by the machine vision system, and the accelerationis terminated at or below the maximum speed that is usable inconjunction with the maximum auto focus image spacing and/or the maximumspeed is determined within a continuous range of speeds available forthe machine vision system.

It should be appreciated that the method outlined in FIG. 6 is usable todetermine or define part program instructions that are operable toautomatically focus an image capture device during high-speed automaticmachine vision inspection of a workpiece. Once the training or learnmode is completed, and the resulting part program stored, in variousexemplary embodiments, multiple additional corresponding workpieces areautomatically inspected by retrieving and using the generated and storedpart program in a run mode of operation.

FIG. 7 shows one exemplary embodiment of a workpiece image 701 and oneexemplary embodiment of a multi area image quality tool 700 useable, invarious exemplary embodiments, to semi-automatically or automaticallydetermine a desirable continuous and/or strobe light setting to be usedwith the rapid auto focus systems and methods that determine anestimated best focus position according to this invention. Variousmethods and graphical user interfaces usable for the multi area imagequality tool 700 and associated lighting adjusting systems, aredisclosed in U.S. Pat. Nos. 6,542,180 and 6,239,554, each incorporatedherein by reference in its entirety.

The exemplary embodiment of the multi area image quality tool 700 shownin FIG. 7 is a dual area image quality tool. The exemplary dual areaimage quality tool 700 includes a first region of interest 710 and asecond region of interest 720 connected by a bar 730. The regionoccupied by the bar 730 constitutes a critical region that generallyincludes a workpiece feature that is to be inspected. As taught in the'180 patent, the dual area image quality tool 700 is used to establish alighting configuration and lighting level that maximizes the differencebetween the average image intensities measured in the first region ofinterest 710 and the second region of interest 720. In this manner, invarious exemplary embodiments, the transition of intensity over an edge750 or other feature in the critical region will lead to the mostprecise definition of the edge 750 or other feature in the image 701,for a given degree of focus in the critical region. The regions ofinterest 710 and 720 are defined as rectangles. It should be appreciatedthat any number of regions of interest having any desired shape areprovided within the multi area image quality tool 700, in variousexemplary embodiments, as taught in the '180 patent.

It should also be appreciated that, in other various exemplaryembodiments of the multi area image quality tool, different ratios forthe width of the regions of interest and the linking bar or bars can beused. It should be appreciated that the length of the linking bar can bezero. That is, two regions of interest can be placed immediatelyadjacent to each other and right to the edge of a feature to beinspected in the critical region, such as an edge.

A multi area image quality tool 700, or the like, is included to operatein a variety of ways in various exemplary embodiments of the systems andmethods according to this invention. For example, in various exemplaryembodiments, a multi area image quality tool is employed by an operatorduring a training mode, in order to evaluate and/or refine anillumination configuration and level originally approximately defined bythe operator. In various exemplary embodiments, the illuminationconfiguration and level originally approximately defined by the operatorare either a continuous or strobe lighting configuration and level. Invarious exemplary embodiments, this is refined using the multi areaimage quality tool. In other various exemplary embodiments, theillumination configuration and level originally approximately defined bythe operator is a continuous lighting configuration converted to strobelighting configuration that provides an approximately equivalent totalimage exposure, and the strobe lighting configuration is refined usingthe multi area image quality tool.

In various other exemplary embodiments, a multi area image quality toolis included in the part program and is executed to refine variousnominal continuous or strobe lighting levels used in conjunction withvarious auto focus operations. For example, in various exemplaryembodiments, when the auto focus region of interest includes an edge tobe inspected, the multi area image quality tool is run following aninitial auto focus sequence, and/or prior to acquiring the finalinspection image at the estimated best focus position. In variousexemplary embodiments, this is done in order to compensate for theeffects of lighting system calibration “drift”, environmental lightingchanges, or the like, and provides the best practical edge auto focusdefinition and/or accuracy when automatically inspecting a workpiece inrun mode.

FIG. 8 shows the exemplary workpiece and feature to be inspected of FIG.7, along with two exemplary embodiments of auto focus tool GUI widgetsusable in various embodiments of the systems and methods according tothis invention. Two exemplary embodiments of auto focus tool GUI widgetsusable with the systems and methods according to this invention includean edge focus tool widget 810 and a surface focus tool widget 820. Invarious exemplary embodiments, these auto focus tools are used toautomatically focus on the exemplary workpiece image 801. In variousexemplary embodiments, predefined auto focus tools have specificsettings. In various exemplary embodiments, these settings are adjustedor redefined by a user, but need not be redefined in order to use thetool. In various exemplary embodiments, the tools are employed with thepredefined settings. Various operating characteristics of the edge focustool GUI widget 810 and the surface focus tool GUI widget 820 aregenerally described in the QVPAK 3D CNC Vision Measuring Machine UsersGuide and the QVPAK 3D CNC Vision Measuring Machine Operation Guide,previously incorporated.

In various exemplary embodiments, the edge focus tool widget 810 isdisplayed as a box with an arrow in the center. In various exemplaryembodiments, the widget 810 is sized, positioned and rotated by anoperator, until the box is indicative of, or defines, the auto focusregion of interest and the arrow is indicative of an edge to beinspected, that is also the edge having the characteristics that areevaluated by the operative edge focus metric(s).

In various exemplary embodiments, the edge focus metric uses one or moreconventional edge gradient(s) along the edge in the region of interest,and the focus value used for each auto focus image is the signedmagnitude of the edge gradient(s). The direction of the arrow, ineffect, defines a reference direction or polarity to be associated withthe edge gradient in these various exemplary embodiments. It should beappreciated that the region of interest indicated by the boundaries ofthe edge focus tool widget 810 is reduced in size, to include just ashort segment along an edge, in various exemplary embodiments, whendesired.

In various exemplary embodiments, the surface focus tool GUI widget 820is displayed as a box with an “X” in the center. In various exemplaryembodiments, the surface focus tool widget 820 is sized, positioned androtated by an operator, until the box is indicative of, or defines, theauto focus region of interest. It should be appreciated that the regionof interest of the surface focus tool widget 820 is increased or reducedin size, to include approximately the proper surface portion used for aparticular inspection operation, such as a height determination, or asurface finish evaluation, or the like, in various exemplaryembodiments.

As previously mentioned, in various exemplary embodiments according tothis invention, the camera system 260 is operated to provide a reducedreadout pixel set according to this invention. The reduced readout pixelset corresponds to substantially less than the full field of view of thecamera system 260 along at least one dimension of the field of view ofthe camera system 260. Thus, a repetition rate for acquiring a sequenceof auto focus images and storing the data corresponding to the reducedreadout pixel set is substantially faster than the rate associated withacquiring images and storing the data corresponding to a full pixel setfor the entire field of view of the camera system 260. In variousexemplary embodiments, a camera system 260 is used that is operable toprovide a reduced readout pixel set that substantially or identicallycorresponds to the regions of interest defined using the edge focus toolwidget 810 or the surface focus tool widget 820. In these exemplaryembodiments, the pixels corresponding to the entire region of interestare used to determine a focus value as outlined previously and discussedfurther below.

In various exemplary embodiments, a surface focus operation provides animage focus that maximizes the definition or sharpness of a surfacetexture in a region of interest, or a pattern projected onto a smoothsurface in a region of interest, in order to provide a coordinate valuethat precisely locates that surface along the Z-axis direction, or toprovide an inspection image at the coordinate that provides the clearestimage for inspecting the surface. In various exemplary embodiments, thesurface focus metric used to determine the focus value for an auto focusimage is indicative of the degree of contrast in the region of interest.One embodiment of such a surface focus metric is the squared gradient ofpixel image intensity or grey-level in the region of interest. Whenfocusing onto a surface, in various exemplary embodiments, the contrastdetermination is based on the average squared gradient of the imageintensity or grey-level within the region of interest. For example, thefollowing equations demonstrate one exemplary embodiment of calculatinga focus value in such exemplary embodiments. For a point i at theinterstice of four pixels A, B, C, and D, define:Contrast _(i)=(A _(i) −B _(i))²+(A _(i) −C _(i))²+(D _(i) −B _(i))²+(D_(i) −C ₁)  (1)which can be rewritten as:Contrast _(i)=2[A _(i) ² +B _(i) ² +C _(i) ² +D _(i) ²−(A _(i) +D_(i))(B _(i) +C _(i))].  (2)For the overall auto focus region of interest (AROI), in variousexemplary embodiments, a representative focus value is determined as theaverage contrast for all N such points in the AROI, that is:$\begin{matrix}{{{focus}\quad{value}_{AROI}} = {\left( {1/N} \right){\sum\limits_{i = 1}^{N}\quad{{Contrast}_{i}.}}}} & (3)\end{matrix}$

FIGS. 9 and 10 show the exemplary workpiece and feature to be inspectedof FIG. 7, along with alternative exemplary embodiments of the graphicaluser interface auto focus tool widgets 810′ and 820′ corresponding tothe edge focus tool and the surface focus tool, respectively. FIG. 9also shows two alternative embodiments of reduced readout pixel setindicating widgets 870 and 875. The reduced readout pixel set indicatingwidget 870 corresponds to reduced readout pixel set of 100 rows ofpixels located at a fixed position in the center of the field of view.The reduced readout pixel set indicating widget 875 corresponds toreduced readout pixel set of a 100×100 block of pixels located at afixed position in the center of the field of view. These alternativeexemplary reduced readout pixel sets are provided by variouscommercially available cameras.

Accordingly, when these exemplary cameras and reduced readout pixel setsare used, in various exemplary embodiments according to this invention,the auto focus tool widgets 810′ and 820′ corresponding to the edgefocus tool and the surface focus tool, respectively, include at leastone dimension that is limited or fixed at a size that is equal to, orsmaller than, the corresponding fixed dimension of the operable reducedreadout pixel set. This is done in order to provide cues or constraintsthat are helpful to an operator for constructively locating and sizingthe region of interest defining widget in the vicinity of a feature ofthe workpiece to be inspected. For example, in various exemplaryembodiments according to this invention, the vertical dimension is solimited or fixed when the reduced readout pixel set corresponding to theindicating widget 870 is operable, and the both the vertical andhorizontal dimensions are so limited or fixed when the reduced readoutpixel set corresponding to the indicating widget 875 is operable.

In various exemplary embodiments, because only the portion of the regionof interest that overlaps with the reduced readout pixel set is actuallyavailable and used for determining a corresponding focus value, in orderto provide sufficiently accurate and/or repeatable focus values, itshould be appreciated that it may be preferable that the operablereduced readout pixel set overlap with a sufficient portion of theregion of interest. In various exemplary embodiments, particularly whenthe region of interest is relatively small, for example, approximatelyas shown in FIGS. 9 and 10, preferably, but not necessarily, a majorityof the region of interest overlaps with the operable reduced readoutpixel set. Thus, in various exemplary embodiments that use a reducereadout pixel set having a fixed location, an appropriate reducedreadout pixel set indicating widget, such as that indicated by thewidgets 870, or 875, or the like, is displayed when an auto focus toolregion of interest indicating widget, such as the widget 810′, or 820′,or the like is displayed, to provide useful visual cues or feedback toan operator during various training mode operations. In suchembodiments, an operator may easily position a feature or region ofinterest to at least partially overlap with the indicated region of thereduced readout pixel set.

In various other exemplary embodiments, the user positions the region ofinterest outside the indicated region of the reduced readout pixel set,and machine vision system is operable to automatically orsemi-automatically reposition the workpiece stage and/or camera suchthat the region of interest is moved to at least partially overlap withthe region of the reduced readout pixel set. In such embodiments, thereduced readout pixel set indicating widget 870, or 875, or the like isuseful to provide visual confirmation of the amount of overlap provided.

FIG. 10 shows, in addition to the auto focus tool region of interestwidgets 810′ and 820′, three alternative instances of a reduced readoutpixel set indicating widget, the various instances indicated at thepositions 880A, 880B and 880C. The reduced readout pixel set indicatingwidgets 880A, 880B and 880C correspond to a reduced readout pixel set ofa fixed or default 100×100 block of pixels located at a controllablevariable position in the field of view. Accordingly, when such a reducedreadout pixel set is used, in various exemplary embodiments according tothis invention, the auto focus tool widgets 810′ and 820′ are initiallypresented on the display with a size that is equal to or smaller thanthe corresponding fixed or default size of the operable reduced readoutpixel set. This is done in order to provide cues or constraints that arehelpful to an operator for constructively locating and sizing the regionof interest defining widget in the vicinity of a feature of theworkpiece to be inspected.

As previously described, because only the portion of the region ofinterest that overlaps with the reduced readout pixel set is actuallyavailable and used for determining a corresponding focus value, in orderto provide sufficiently accurate and/or repeatable focus values, itshould be appreciated that it may be preferable that the operablereduced readout pixel set overlap with a sufficient portion of theregion of interest. In various exemplary embodiments, particularly whenthe region of interest is relatively small, for example, approximatelyas shown in FIG. 10, preferably, but not necessarily, a majority of theregion of interest preferably overlaps with the operable reduced readoutpixel set. Thus, in various exemplary embodiments that use a reducereadout pixel set having a fixed size and a variable location, anappropriate reduced readout pixel set indicating widget, such as thatindicated by the widgets 880A, 880B and 880C or the like, is displayedwhen an auto focus tool region of interest indicating widget, such asthe widgets 810′, or 820′, or the like, is displayed. This providesuseful visual cues or feedback to an operator during various trainingmode operations.

In various exemplary embodiments, the reduced readout pixel set and theappropriate indicating widget, such as the widget 880, are automaticallycentered with respect to the defined region of interest, and when aboundary of the region of interest indicating portion of an auto focustool GUI widget extends outside of the indicated location of the reducedreadout pixel set, a graphical user interface element is automaticallyactivated to highlight that condition. For example, in various exemplaryembodiments, the portions of the auto focus tool widget 820″ that extendoutside of the indicated region of the reduced readout pixel set at thelocation 880B are highlighted by a line color or thickness change, orthe corresponding area highlighted, or the like. In such exemplaryembodiments, an operator easily recognizes and or adjusts the portion ofa region of interest that does not overlap the indicated region of thereduced readout pixel set, and/or decides whether the overlappingportion is sufficient. If the operator decides that the overlapping areais not sufficient, then the previously outlined overrule mode isimplemented in various exemplary embodiments.

At the location 880A, the region of interest 810′ is entirely overlappedby the indicated reduced readout pixel set. At the location 880C, theregion of interest 820′ exactly coincides with the indicated reducedreadout pixel set, such that the indicated reduced readout pixel set isnot clearly visible.

FIG. 11 shows an exemplary embodiment of a surface auto focus tool GUIwidget 820′″, along with exemplary embodiments of various controlwidgets usable to select various modes and operations associated withauto focus operations according to this invention in a training mode. Invarious exemplary embodiments, the control widget 830 is clicked on witha mouse or otherwise actuated to initiate automatic operations such thata region of interest is moved to at least partially overlap with theregion of a fixed reduced readout pixel set, as previously outlined.

In various exemplary embodiments, the control button 832 of the controlwidget 831 is clicked on with a mouse to select an operating mode wherea relatively small reduced readout pixel set is selected in order toprovide a relatively faster auto focus image acquisition rate for fasterauto focus operations, even if the reduced readout pixel set overlapsonly a sufficient portion of a defined region of interest. In contrast,in various exemplary embodiments, the control button 833 is clicked onwith a mouse or otherwise actuated to select an operating mode where thereduced readout pixel set, or, if necessary, the overrule mode, isselected, such that the operable set of read out pixels is at leastlarge enough to overlap all of the defined region of interest. This isdone in order to provide the best possible estimated best focus positionaccuracy for an odd-shaped or extensive region of interest, for example.

In various exemplary embodiments, the control button 835 of the controlwidget 834 is clicked on with a mouse or otherwise actuated to select anauto focus mode that provides a relatively low accuracy mode fordetermining the estimated best focus position, for example a lowaccuracy mode approximately as previously described. This also providesrelatively fast auto focus operation. In contrast, in various exemplaryembodiments, the control button 836 is clicked on with a mouse orotherwise actuated to select an auto focus mode that provides thehighest accuracy mode for determining the estimated best focus position,for example a high accuracy mode approximately as previously described.

In various exemplary embodiments, the control button 838 of the controlwidget 837 is clicked on with a mouse or otherwise actuated to initiateautomatic operations that provide an auto focus learn or training modedemonstration that mimics the results of comparable run mode operations,for example, as outlined previously. In various exemplary embodiments,the control button 839 of the control widget 837 is clicked on with amouse or otherwise actuated to accept the settings of a fully defined ortrained auto focus tool, for example, to bypass a training mode autofocus demonstration, or to accept the results indicated by an evaluationimage provided as a results of a training mode auto focus demonstration,in order to move on to additional training mode operations.

It should be appreciated that, in various exemplary embodiments, variousaspects of the previously described auto focus tools and widgets may beimplemented separately or in various combinations. Furthermore, itshould be appreciated that, in various exemplary embodiments,alternative forms of the various GUI widgets and controls are apparent.Therefore, the foregoing embodiments are intended to be illustrativeonly, and not limiting.

FIG. 12 illustrates one exemplary embodiment of a graphical userinterface window for an exemplary auto focus tool usable according tothis invention. Various exemplary embodiments include an exemplarydialog box 901 usable in connection with displaying and/or redefiningsome of the default auto focus parameters associated with an auto focusGUI tool, such as the edge focus tool 810 or the surface focus tool 820outlined above. In various exemplary embodiments, a user calls up such adialog box at various times during manual or training mode operation ofa machine vision inspection system. Thereafter, in various exemplaryembodiments, the user sets up and runs the auto focus GUI tool using thedefault parameters at any time.

It should also be appreciated that a similar dialog box is used todisplay and/or redefine the associated auto focus parameters for aninstance of an auto focus GUI tool that is customized for a particularapplication or workpiece region of interest by the user, graphically orotherwise, as outlined above, in various exemplary embodiments. In asurface focus mode, the dialog box 901 includes displays or entries thatindicate the focus mode; the tool position and size, that is, thenominal location and size of the auto focus region of interest; thesearch range, that is, the total auto focus Z-scan range or focus imagerange, which, in various exemplary embodiments, is in units that arenormalized to be applicable in terms of the depth of field of any usablelens, or the like; and a default search type, that is, the type of speedand accuracy combination, for example, low, medium, or high accuracy,that provides the basis for various selecting of, and or controlling,various other auto focus parameters, as previously discussed in relationto various auto focus accuracy and speed considerations.

In the exemplary embodiment shown in FIG. 12, the user observes and/orchanges the Auto Focus Tool settings numerically. It should also beappreciated that, in still other exemplary embodiments, the Auto FocusTool settings are observed and/or changed graphically. Thus, it shouldbe appreciated that, in various exemplary embodiments, the auto focussystems and methods according to this invention are trained and usedmanually, or semi-automatically, or automatically, using variouseasy-to-use text-based and graphical methods, and, in various exemplaryembodiments, are similarly customized or adapted to a wide variety ofindividual applications and workpiece features and regions of interest,by “non-expert” users. Various additional parameters settings or otheruseful alternative forms of the dialog box 901, or the like, should beapparent. Thus, it should be appreciated that the foregoing embodimentis intended to be illustrative only, and not limiting.

FIG. 13 is a plot 1000 illustrating a generic relationship between thesize of a reduced readout pixel set and achievable auto focus imageacquisition rate in various exemplary embodiments according to thisinvention. In various exemplary embodiments, the camera system isoperable to select among a plurality of reduced readout pixel sets ofdifferent sizes within the overall or maximum camera field of view.

In FIG. 13, the X-axis denotes the size of a reduced readout pixel set.Points to the right on the X-axis indicate a reduced readout pixel sethaving a larger size, in terms of camera pixel units, or the like.Points to the left on the X-axis indicate a reduced readout pixel sethaving a smaller size, in terms of camera pixel units, or the like. TheY-axis in FIG. 13 denotes the focus image acquisition rate. Pointshigher on the Y-axis pertain to faster focus image acquisition ratesthan points lower on the Y-axis.

The curve 1001 in FIG. 13 represents an inherent or generic operatingcharacteristic of various cameras used in various exemplary embodimentsaccording to this invention. The exemplary theoretical curve 1001 isnearly linear. However, it is not perfectly linear because thefunctional characteristics of most cameras are not linear due to certaintiming “overhead” for camera operations that do not change regardless ofthe size of the reduced readout pixel set for a particular image. Itshould be appreciated that a similar actual curve can be established forany similar type of individual camera used according to the principlesof this invention. However, the actual curve for one camera will notnecessarily be the same as the actual curve for another camera. However,as shown in FIG. 13, generally, smaller reduced readout pixel set sizesresult in faster auto focus image acquisition rates in variousembodiments according to this invention, where the camera system isoperable to select among a plurality of reduced readout pixel sets ofdifferent sizes within the overall or maximum camera field of view.Conversely, larger auto focus reduced readout pixel set sizes lead toslower auto focus image acquisition rates, but may be required in orderto provide a desired level of accuracy. In order to achieve a highlyaccurate estimate of the best focus position, in various exemplaryembodiments according to this invention, in a high accuracy mode, thereduced readout pixel set sizes are selected in conjunction with adefined region of interest such that on the order of 10,000 pixels areincluded in the region where the reduced readout pixel set overlaps theregion of interest.

Consideration of the camera operating characteristics reflected in FIG.13 generally facilitates the selection of a desirable combination ofauto focus parameters according to the systems and methods of thisinvention, including the selection of a desirable size for the autofocus region of interest, in order to best obtain a desirablecombination or tradeoff of auto focus speed and accuracy.

FIG. 14 is a plot 1100 illustrating exemplary generic relationshipsbetween focus image acquisition rate and auto focus scan motion speedfor an exemplary lower accuracy auto focus mode corresponding to thecurve 1101 and an exemplary higher accuracy auto focus modecorresponding to the curve 1102, in various exemplary embodimentsaccording to this invention. The X-axis denotes the auto focus imageacquisition rate, the same operating characteristic or parameterreflected on the Y-axis in FIG. 13. Thus, in various exemplaryembodiments, having determined a focus image acquisition rate asdescribed in connection with FIG. 13, an allowable auto focus scanmotion speed is then determined based on the relationships illustratedin FIG. 14.

The Y-axis in FIG. 14 corresponds to an average auto focus scan motionspeed along the Z-axis direction for embodiments that use a relativelyconstant speed while acquiring a sequence of auto focus images, and itapproximately corresponds to the maximum auto focus scan motion speedwithin a desired auto focus image range along the Z-axis direction forembodiments that use acceleration over a significant portion of thedesired auto focus image range while acquiring a sequence of auto focusimages. In either case, higher locations on the Y-axis in FIG. 14correspond to faster auto focus scan motion speeds and lower points onthe Y-axis in FIG. 14 correspond to slower auto focus scan motionspeeds.

It should be appreciated that a particular auto focus image acquisitionrate divided by a particular average or maximum auto focus scan motionspeed within the desired auto focus image range directly determines theauto focus image sample density, or the maximum auto focus imagespacing, respectively, along the Z-axis direction, that is provided fora particular set of auto focus images, and determines the correspondingfocus curve. Thus, relatively higher or dense focus curve sampledensities, or relatively smaller maximum auto focus image spacings,occur down and to the right on curves in the plot 1100 and relativelylower or sparse focus curve sample densities, or relatively largermaximum auto focus image spacings, occur up and to the left on curves inthe plot 1100. Focus curve sampling density and its relation to autofocus accuracy was previously discussed with reference to FIGS. 3 and 4.As is apparent from the preceding discussion, for embodiments that useacceleration during auto focus image acquisition, the magnitude of themaximum auto focus image spacing determines a “non-linear” focus curvesample density that is on the average either more dense corresponding toa smaller maximum spacing, or more sparse corresponding to a largermaximum spacing. Therefore, the accuracy effects related to themagnitude of the maximum auto focus image spacing are understood byanalogy with the related discussions of focus curve sample density andaccuracy included herein.

Relatively less dense focus curve sampling generally leads to increaseduncertainty or error in estimating a focus curve and the associatedestimated best focus position. Accordingly, the relatively loweraccuracy auto focus mode curve 1101 occurs up and to left, and therelatively higher accuracy auto focus mode curve 1102 occurs down and tothe right, in the plot 1100.

Each of the respective auto focus mode curves 1101 and 1102 reflect arespective focus curve sample density that is the same at each pointalong the respective curve. Thus, operation according to any point alongthe higher accuracy auto focus mode curve 1102 generally tends togenerate a more densely sampled focus versus position curve such as thatillustrated in FIG. 3. In contrast, operation according to any pointalong the lower accuracy auto focus mode curve 1101 generally tends togenerate a more sparsely sampled focus versus position curve such asthat illustrated in FIG. 4. Although only two auto focus accuracy modecurves are shown in FIG. 14, it should be appreciated that an entirefamily of curves exists representing relatively higher accuracies andhigher sampling density for a focus versus position curve, for lowercurves in the plot 1100, and lower accuracies representing lowersampling density in a focus versus position curve, for higher curves inthe plot 1100.

It should be appreciated that, other factors being equal, it isgenerally advantageous to provide the fastest possible auto focusoperations. Thus, in various exemplary embodiments according to thisinvention, it is generally preferable to operate at a point toward thelower left end of any particular auto focus accuracy mode curve thatprovides a desired level of auto focus precision. Of course, each camerawill inherently have a maximum focus image acquisition rate for aparticular auto focus region of interest size. This will determine thefastest allowed operating point in various embodiments according to thisinvention. The line 1104 in FIG. 14 generically represents such a point.Given such an allowed or selected operating point, the correspondingauto focus scan motion speed that provides the required sampling densityor maximum auto focus image sample spacing is easily determined and isused as a corresponding auto focus parameter. This is indicated, forexample, by the lines 1105 and 1106 in FIG. 14, which genericallyrepresent respective allowable auto focus scan motion average speeds, ormaximum speeds, corresponding to respective desired sampling densities,maximum spacings, or accuracies.

It should also be appreciated that the analysis outlined above withrespect to FIGS. 13 and 14 occurs in a different order in variousexemplary embodiments. For example, beginning on the Y-axis in FIG. 14,in various exemplary embodiments, after an auto focus scan motion speed,or maximum speed, is selected or defined, then the focus imageacquisition rate is determined from the applicable accuracy mode curve.Using that focus image acquisition rate, in various exemplaryembodiments, the allowable reduced readout pixel set size is determinedbased on the relationships defined in FIG. 13.

Similarly, in various exemplary embodiments one begins by selecting adesired accuracy. In these various embodiments, a curve defining afunctional relationship between focus image acquisition rate and theaverage or maximum auto focus scan motion speed is then defined as shownin FIG. 14. In various exemplary embodiments, having first selected thedesired accuracy, an auto focus scan motion speed or a focus imageacquisition rate is subsequently defined. Then, in these variousembodiments, the other of the auto focus scan motion speed and the focusimage acquisition rate is determined.

Thus, it should be appreciated that, after defining two of the threevariables, the third variable is determined. It should similarly beappreciated that, in various exemplary embodiments, any ordering of anytwo of the three variables occurs, leading to the value for the last ofthe three variables being determined. Thus, consideration of the cameraoperating characteristics reflected in FIGS. 13 and 14 generallyfacilitates the selection of a desirable combination of auto focusparameters according to this invention, in order to best obtain adesirable combination or tradeoff of auto focus speed and accuracy.

FIG. 15 is a plot comparing a motion curve 1501 that is achievable witha conventional auto focus image acquisition rate of 30 images per secondand a motion curve 1502 that is achievable with a relatively faster autofocus image acquisition rate of 200 images per second that is providedusing a reduced readout pixel set in various exemplary embodimentsaccording to this invention.

The curves 1501 and 1502 correspond to a low magnification lens having aDOF of 306 microns, and a maximum auto focus image spacing along thefocus axis direction of 0.3*DOF=92 microns. This maximum image spacingis usable to provide a medium accuracy estimated best focus position.

The curves 1501 and 1502 show the accumulated distance moved along thefocus axis direction over time. Initially, each motion is assumed tostart with zero speed at the beginning of a desired auto focus imagerange of 3.0 mm. Each motion then corresponds to the same nominalacceleration of 0.1 g=980 mm/sec². This is a typical maximumacceleration provided by a precision machine vision inspection system.After approximately 0.28 seconds, as shown by the curve 1501, the speedcannot be increased further for the conventional auto focus imageacquisition rate of 30 images per second. This is because the maximumdesired image spacing corresponding to the desired accuracy level isattained at that speed. This is approximately 27.7 mm/sec. Thus, themotion indicated by the curve 1501 continues with a constant speedthrough the remainder of the auto focus image range of 3.0 mm.

In contrast, the nominal acceleration of 0.1 g=980 mm/sec² continues forthe motion indicated by the curve 1502 through the entire desired autofocus image range of 3.0 mm, for the relatively faster auto focus imageacquisition rate of 200 images per second that is provided in variousexemplary embodiments according to this invention. The speed reaches amaximum of approximately 77 mm/sec at the end of the desired auto focusimage range. This is well short of the allowable maximum speed ofapproximately 184 mm/sec. The allowable maximum is usable to provide thesame maximum auto focus image spacing of 92 microns, at 200 images persecond. Several differences and advantages are apparent for the motioncurve 1502, corresponding to the relatively faster auto focus imageacquisition rate of 200 images per second that is provided using areduced readout pixel set in various exemplary embodiments according tothis invention, in comparison to the motion curve 1501, corresponding tothe conventional image acquisition rate of 30 images per second.

It should be appreciated that, for relatively fast image acquisitionrates provided using a reduced readout pixel set in various exemplaryembodiments according to this invention, it may be desirable for themotion to include acceleration over most or all of the desired autofocus image acquisition range. Provided that the allowable maximum speedis not exceeded, this will generally shorten the overall time requiredfor auto focus operations. It should also be appreciated that whenacceleration is used during image acquisition, and particularly when theacceleration is not well controlled and/or known, it may be desirable touse short effective exposure durations, deterministic encoder positionlatching in relation to the effective image exposure time, and/orvarious other methods according to this invention, including thoseoutlined above, in order that the non-linear blur-ambiguity in the imageis reduced due to the small motion range during the image exposure, andin order that the actual position at the nominal exposure time isaccurately determined without the need to infer the position based ontime and a constantly-changing ill-defined speed. Such methods provide afast, simple, and accurate estimate of the best focus position accordingto this invention, even when high motion speeds and accelerations areused. It should be appreciated that, with the conventional imageacquisition rate and correspondingly constrained lower speeds andconstant velocities used in many conventional auto focus methods, thepotential errors due to blur-ambiguity and position inference aresignificantly smaller. Therefore, such methods have not found itnecessary to use the methods described above for reducing errorsassociated with higher speeds and significant accelerations along theZ-axis direction during image acquisition.

It should also be appreciated that the auto focus image acquisitionalong the desired auto focus image range is completed in approximately{fraction (1/3)} less time for motion curve 1502. In addition, themaximum image spacing actually provided along the motion curve 1502 at200 images per second is approximately 60% less than that provided alongthe motion curve 1501 at 30 images per second. Thus, at 200 images persecond, the auto focus method is both significantly faster andsignificantly more accurate. In the exemplary embodiment shown in FIG.15, the motion over at least a part of the focus image range is at least2.5 times faster for the relatively fast image rate provided accordingto this invention than a fastest motion allowable in combination withthe conventional image acquisition rate in order to produce adjacentauto focus images that are spaced apart along the focus axis directionby a desired maximum spacing. It should be appreciated that, in variousother exemplary embodiments, where the motion used with the image rateprovided according to this invention includes a preliminary accelerationbefore entering the desired auto focus image range to provide higherspeeds along the desired auto focus image range, the motion over atleast a part of the focus image range is at least 5.0 times faster foran image rate provided according to this invention than a fastest motionallowable in combination with a conventional image acquisition rate inorder to produce adjacent auto focus images that are spaced apart alongthe focus axis direction by the same maximum spacing. In variousexemplary embodiments that further increase the speed of auto focusoperations according to this invention, such preliminary accelerationsare used to provide motion over at least a part of the focus image rangethat is at least 90% as fast as the fastest motion allowable incombination with a relatively fast image rate provided according to thisinvention to produce the maximum desired auto focus image spacing.

It should be appreciated that, when there is motion during the exposuretime of an auto focus image, each pixel of the camera will accumulate anintegrated signal corresponding to all the light received from a pointon the workpiece as it traverses over some range along the Z-axisdirection during the exposure time. As a first related consideration,for cameras that offer only relatively longer exposure durations, thismay lead to unacceptable blur-ambiguity in all auto focus images, aspreviously outlined, or, conversely, inhibit relatively higher autofocus scan motion speeds and/or relatively fast auto focus operations.

As a second related consideration, even when motion-relatedblur-ambiguity is otherwise substantially reduced, since variousportions of a focus curve are relatively nonlinear, the precise Z-axisposition that should be associated with the “integrated” auto focusimage is not always easily determined to a desired accuracy. Thisdifficulty is compounded when acceleration, and especially a relativelyimprecisely known or variable acceleration, is used during auto focusimage acquisition. Some uncertainty and error is therefore associatedwith attributing a Z-position to each integrated auto focus image, evenif an encoder position is latched in relation to the image exposuretime, as previously outlined. Such cases may exist, particularly whenhigh magnification or small depth of field lenses are in use, and/or alow auto focus accuracy requirement would otherwise allow relatively lowsampling densities and high motion speeds.

Thus, in various exemplary embodiments according to this invention, astrobe lighting capability is provided that can address both of theseconsiderations, by providing effective exposure durations that aregenerally much shorter than can be provided by reasonably priced generalpurpose machine vision cameras. For example, in one exemplary embodimentsuitable for relatively high precision applications, the illuminationlight(s) source is(are) strobed with a duration such that the workpiecemoves a desired maximum amount, or less, during the strobe timingduration. In various exemplary embodiments intended for high precisionmeasuring, the desired maximum amount of workpiece motion is on theorder of 0.25 microns. For example, in one exemplary embodiment, a 16.66microsecond exposure is utilized at a motion speed of 15 mm per secondand is adapted to be proportionately shorter as a motion speed becomesproportionately faster, limited only by the ability of the light sourcesand controllers to output sufficient intensity levels to provide therequired total image exposure energy over the decreasing exposuredurations.

In various other exemplary embodiments, sufficient measuring accuracy isprovided by limiting the maximum motion along the focus axis during aneffective auto focus exposure duration to at most 0.5 microns. In yetother exemplary embodiments, sufficient measuring accuracy is providedby adapting the maximum motion along the focus axis during an effectiveauto focus exposure duration to at most 0.25 times the maximum autofocus image spacing provided in a set of auto focus images along thedesired auto focus image range.

It should be appreciated that with short exposure durations, theeffective image integration is limited, motion-induced imageblur-ambiguity is reduced or eliminated, and the uncertainty in thecorresponding Z-axis position is also reduced, increasing both theachievable auto focus speed and accuracy in various exemplaryembodiments having short exposure durations.

FIG. 16 is a plot 1200 illustrating exemplary generic relationshipsbetween a light setting (power setting) during a continuous illuminationthat is satisfactory during a reference or standard exposure time, andcorresponding respective strobe duration times for a number ofrespective strobe light power levels. The respective strobe light powerlevels are represented by the lines 1201, 1202 and 1203. Various methodsof establishing various desirable strobe light parameters for an autofocus operation have been discussed previously. The following discussiondescribes various considerations related to one exemplary method ingreater detail.

The X-axis in FIG. 16 corresponds to the light setting (power setting)during continuous illumination that produces a satisfactory “stationary”workpiece image that is acquired throughout a reference or standardexposure time, such as the frame rate of conventional cameras. Thismethod of illumination and exposure is conventional, and is well-suitedfor operation of a vision machine during manual operations and trainingmode operations that involve a machine operator. As previouslymentioned, in various exemplary embodiments, a known light sourcecontinuous power setting times the known or standard camera integrationperiod establishes a total exposure illumination energy for that lightsource. The Y-axis in FIG. 16 corresponds to a strobe duration timenecessary for a given strobe light power to achieve an image intensityequivalent to the light setting (power setting) during continuousillumination, that is, to achieve the same total exposure illuminationenergy for that light source.

It should be appreciated that, in various exemplary embodiments, to afirst approximation, a particular total exposure illumination energy(corresponding to a particular continuous illumination level, when usingthe reference or standard exposure time) divided by a particular strobelight power level directly determines the corresponding required strobeduration time. Each of the respective strobe light power curves 1201,1202 and 1203 reflects a respective strobe light power setting that isthe same at each point along the respective curve. Thus, operationaccording to any point along the higher power curve 1203 will allow ashorter strobe duration time than operation according to corresponding(vertically aligned) points along either of the lower power curves 1202and 1201, as illustrated in FIG. 16. Although only three strobe lightpower curves are shown in FIG. 16, it should be appreciated that anentire family of curves exists representing various other strobe lightpower levels.

It should also be appreciated that, other factors being equal, it isgenerally advantageous in various exemplary embodiments according tothis invention, to operate at a point toward the lower left end of anystrobe light power curve, in order to provide the shortest possiblestrobe duration and produce images having the least motion-related blurand the smallest possible uncertainty in the corresponding Z-axisposition.

It should further be appreciated that each strobe light source willinherently have a maximum allowable power level and, in the absence ofother camera response considerations, and the like, this factor maydetermine the fastest allowed strobe duration in various embodimentsaccording to this invention. The higher power curve 1203 in FIG. 16generally represents such a maximum power level. Given such a maximum orselected power level that is set as an auto focus parameter, and given adesired operating point, generally indicated by the line 1204 in FIG.16, the corresponding strobe duration time that provides the requiredmatching total exposure illumination energy is then determined and usedas a corresponding auto focus parameter, as indicated by the lines 1205and 1206 in FIG. 16. The lines 1205 and 1206 generally representrespective strobe duration times corresponding to respective strobelight power levels.

It should also be appreciated that the analysis outlined above withrespect to FIG. 16 occurs in a different order in various exemplaryembodiments. For example, in various exemplary embodiments, a desiredstrobe duration time is defined along the Y-axis, then the correspondingrequired strobe light power is determined at the intersection of theX-axis and Y-axis values in the plot 1200. Consideration of the variousauto focus system operating characteristics reflected in FIGS. 13, 14and 16 generally facilitates the selection of a desirable combination ofauto focus parameters according to this invention, in order to bestobtain a desirable combination or tradeoff of auto focus speed andaccuracy.

FIGS. 17 and 18 are flowcharts outlining one exemplary embodiment of amethod for automatically focusing an image capture device according tothis invention, for example, during an automatic run mode of operation.Beginning in step S300, operation of the method continues to step S310,where a part program is input to the machine vision inspection system.Then, in step S320, a first part program operation is selected. Next, instep S330, the first part program operation is evaluated to determinewhether or not it is an auto focus operation. If the first part programoperation is an auto focus operation, operation proceeds to step S340.If the first part program operation is not an auto focus operation,operation jumps to step S580.

In step S340, the auto focus settings or parameters that may bedesirable to completely define various run mode auto focus operationsand settings are identified. The auto focus settings that are identifiedin step S340 correspond to the confirmed set of auto focus variables orparameters and the any other settings that were recorded in step S230 ofFIG. 6. Those settings are described above in greater detail inconnection with step S230. It should be appreciated that, in addition toinformation regarding the lens selected, the auto focus settings mayalso include information regarding various lens parameters as theyrelate to any lens-specific adjustments or set-up operations related tothe various auto focus settings. Next, in step S350, the parametersand/or configuration of various machine vision inspection systemcomponents are set according to the auto focus settings identified instep S340. For example, in step S350 various settings or controlparameters related to the dimensions of the region of interest, thedesired auto focus accuracy and/or sample density and/or maximum autofocus image spacing along the desired auto focus image range, theillumination settings, the auto focus scan motion and/or maximum speedand scanned range, control parameters based on the parameters of theselected lens, the desired auto focus image range, and the like, areset. Operation then continues to step S360.

In step S360, the lens corresponding to the lens settings identified instep S340 and set in step S350, is selected and positioned in theoptical path. Next, in step S370, the particular region of interest ofthe workpiece is appropriately positioned to a nominal position in thefield of view. Then, in step S380, the nominal illumination is set. Thenominal illumination set in step S380 corresponds to the nominalillumination stored in step S180, described above in connection withFIG. 6. Operation then proceeds to step S390.

In step S390, a working view of the workpiece is obtained based on theillumination set in step S380. Then, in step S400, the working view isevaluated to determine whether or not the illumination is satisfactory.For example, in various exemplary embodiments, the results of anautomatically executed multi-area image quality tool are used for theevaluation. If the illumination is determined to be unsatisfactory instep S400, operation proceeds to step S410. Otherwise, operation jumpsto step S420. In step S410, the illumination is refined. For example, invarious exemplary embodiments this refinement is based on the results ofthe automatically executed multi-area image quality tool, or by anyother applicable known or later developed means for improvingillumination settings. Operation then returns to step S390, whereanother working view of the workpiece is obtained based on the refinedillumination.

It should be appreciated that, in various other exemplary embodiments,steps S390-S410 are omitted. For example, in various exemplaryembodiments, after the method is implemented several times, theinspection results, or user observation, may indicate that the nominalillumination settings set in step S380 always result in a satisfactoryillumination. It may be preferable in such a case to omit stepsS390-S410 as an unnecessary confirmation of the illumination. Thus, inthose exemplary embodiments, where steps S390-S410 are omitted,operation proceeds directly from step S380 to step S420.

In step S420, the camera is moved to a position near one end of anoperative auto focus image range. For example, in various exemplaryembodiments, this corresponds to a displacement relative to a currentnominal Z-axis position of the region of interest, to a positionapproximately 0.5-2.0 times the depth of field of the current lensbeyond a maximum expected variation or tolerance in the Z-position ofthe region of interest. Then, in step S430, the camera begins movingalong the Z-axis. In various exemplary embodiments, the camera motionincludes a preliminary acceleration or speed outside of the operativeauto focus image range and is continuous and at a nominally constantspeed during auto focus image acquisition in the desired auto focusimage range. In various exemplary embodiments, the camera motion iscontinuous and accelerates through some or all of the desired auto focusimage range. In various other embodiments according to this invention,the camera motion is discontinuous and/or includes other speedvariations, provided that operable auto focus images are acquired.

Next, in step S440, in various embodiments where the camera is not moveddirectly to the operative starting-end position of the operative autofocus image range in step S420, for example when a preliminaryacceleration is provided beginning outside of the operative auto focusimage range, the current actual Z-axis position is compared to anoperative starting-end position used to govern the range used foracquiring auto focus images. Operation then continues to step S450.

In step S450, a determination is made whether the comparison of theactual Z-axis position and the operative starting end position indicatethat the actual Z-axis position is within the operative auto focus imageacquisition range. If the actual camera position, the actual Z-axisposition, is not within the operative auto focus image acquisitionrange, operation returns to step S440, where the then-current actualcamera position is compared to the operative starting end position.Otherwise, once the current actual camera position is within theoperative auto focus image acquisition range, operation continues tostep S460, where a control signal is sent to reset the camera inpreparation for an auto focus image acquisition. Next, in step S470, anauto focus image including at least the reduced readout pixel set isacquired. It should be appreciated that in various exemplaryembodiments, as previously described, a current Z-axis position value islatched or acquired in correspondence to the acquired auto focus image.Operation then continues to step S480.

In step S480, the reduced readout pixel set is output to the controlsystem portion of the machine vision system and stored. In variousexemplary embodiments, the corresponding Z-axis position value is alsostored. Then, in step S490, a determination is made whether there aremore auto focus images to be acquired along the operative auto focusimage range. In various exemplary embodiments, this comprisesdetermining whether a then-current actual camera position is stillwithin the operative auto focus image range. In various other exemplaryembodiments, this includes determining whether a predetermined number ofauto focus images known to span the operative auto focus image range,for example, based on a known image acquisition rate and a known autofocus motion profile, have been acquired. If there are more auto focusimages to be acquired along the operative auto focus image range,operation returns to step S460 where, in various exemplary embodiments,a control signal is sent to reset the camera in preparation for anotherauto focus image acquisition. Otherwise, operation proceeds to stepS500, where the motion of the camera in the Z-axis is stopped orredirected for a next operation.

In the various exemplary embodiments of the auto focusing operationsdescribed above in connection with steps S460-S480, each auto focusimage is obtained based on a trigger signal that is sent to the camera.In various exemplary embodiments, these signals are provided by theGalil motion control card #DMC-1730, or the like, based on apredetermined timing that is compatible with or determined based on animage acquisition rate that is compatible with the operative reducedreadout pixel set and the operative auto focus motion. In various otherexemplary embodiments, these signals are provided based according to adefault timing or a free-running timing that is compatible with, ordetermined based on, an operative image acquisition rate for the reducedreadout pixel set, and that is compatible with the operative auto focusmotion. In other exemplary embodiments, the triggers signals are basedon determined auto focus image positions instead of on time. In stillother exemplary embodiments, the images are obtained based on “readysignals” or a default timing designed to maximize the focus imageacquisition rate, as previously outlined with reference to FIGS. 13 and14, for example.

In various exemplary embodiments, a determination between these varioustrigger methods, and the determination of the corresponding governingauto focus variable or parameters, is based on the settings to thevariables defined and determined in steps S190-S210 of FIG. 6. In stillother exemplary embodiments, as described in greater detail above inconnection with FIG. 5, auto focus images are obtained based on acascade of signals initiated by a trigger signal sent to a strobelighting controller, which, in various exemplary embodiments alsocontrols the latching of corresponding actual Z-axis position values. Inany case, next, in step S510, a region of interest focus value isdetermined for pixels included in the region of interest for at leastsome of the stored sets of reduced readout pixel set data. Then, in stepS520, the region of interest focus values determined in step S510 areanalyzed.

In various exemplary embodiments, the analysis includes comparing thefocus values and identifying the maximum determined focus value. Inother exemplary embodiments, the analysis includes fitting an estimatedfocus curve, or a portion of an estimated focus curve, or the like, tothe determined focus values, by any now known or later developed method.For example, in various exemplary embodiments, a polynomial of 2nd orderor higher is fit to at least some of the determined focus values locatedat a number of positions bounding and including the maximum determinedfocus value. In various exemplary embodiments, the polynomial is a5^(th) order polynomial.

Next, in step S530, an estimated best focus position that estimates thetrue peak of the focus curve is determined. In various exemplaryembodiments where the maximum determined focus value was determined inthe step S520, a sufficiently accurate or relatively approximate regionof interest focus position is determined as the estimated best focusposition corresponding to that focus value. In other various embodimentshaving a higher accuracy, where an estimated focus curve, or a portionof an estimated focus curve, was fitted to the determined focus valuesin the step S520, an accurate or relatively less approximate estimatedbest focus position is determined as the Z-axis position correspondingto the peak, or line of symmetry, of the fitted focus curve.

The peak or line of symmetry of the fitted focus curve is determined byany now known or later developed method. For example, in variousexemplary embodiments where a polynomial is fit to the determined focusvalues, the location of the peak is determined from the zero crossing ofthe first derivative of the fit polynomial, or the like. It should beappreciated that numerous other alternative embodiments are usable inplace of the operations of the steps S520 and S530, provided that asufficiently or highly accurate estimated best focus position isdetermined for the region of interest. Operation then continues to stepS540.

In various exemplary embodiments of the auto focusing method, all imagesare obtained before a region of interest focus value is determined forany of the stored images. Likewise, in various exemplary embodiments,all of the region of interest focus values determined in step S510 aredetermined before any analysis of the determined focus values occurs instep S520. However, in various other exemplary embodiments, theoperations of the step S520 are performed in parallel with theoperations of the step S510. This provides a faster overall throughputfor the auto focus operations and determines a desired inspection imagein less time, in various exemplary embodiments.

Similarly, in still other exemplary embodiments, some of the operationsof step S510 occur between the operations of the steps S480 and S490. Inthis embodiment, the region of interest focus value is determined foreach stored image immediately after the image is stored, without waitingfor all subsequent images to be obtained and stored. Likewise, in yetother exemplary embodiments, some of the operations of the step S520occur between the operations of the steps S480 and S490. In suchexemplary embodiments, not only is the region of interest focus valuedetermined for each stored image immediately after that image is stored,but analysis of the determined focus values is initiated while theacquisition and storing of subsequent images is ongoing.

In step S540, if a sufficiently complete and focused inspection image isnot already included among the set of acquired auto focus images, thecamera is moved to the estimated best focus position identified in stepS530. Then, in step S550, an inspection image of at least the region ofinterest of the workpiece is acquired. In various exemplary embodiments,the inspection image includes the entire filed of view. In variousexemplary embodiments, the inspection image obtained in step S550corresponds to the best focus position available for that image as aresult of the systems and methods according to this invention. Next, instep S560, the inspection image is evaluated to obtain inspectionresults. Then, in step S570, the inspection results obtained in stepS560 are recorded. Operation then jumps to step S590. In contrast, instep S580, the next, non-auto focus operation of the part program isexecuted. Operation then continues to step S590.

In step S590, a determination is made whether there are any more partprogram operations remaining to be executed. If there are any partprogram operations to be executed, operation returns to step S320.Otherwise, operation continues to step S600, where operation of themethod stops. It should be appreciated that in various exemplaryembodiments, the estimated best focus position determined in step S530is used as an inspection coordinate for a feature in the region ofinterest corresponding to the auto focus operation. Furthermore, invarious exemplary embodiments, no other inspection operation is requiredin the region of interest, and at least the steps S540 and S550 areomitted in various embodiments.

As previously outlined, in various alternative embodiments, to performor replace at least some of the operations described above in relationto the steps S460-S490, a set of auto focus images is obtained based ona cascade of signals initiated by a trigger signal sent to a strobelighting controller. In various exemplary embodiments, the strobelighting controller also controls the latching of corresponding actualZ-axis position values.

In greater detail, in various exemplary embodiments of strobe lightingmode auto focus operations, initially the positions of all positionencoders connected to a motion control card are polled simultaneously ata high frequency, using inherent capabilities of the motion controlcard. When the Z-axis position falls within the operative auto focusimage range, for example, when it exceeds a determined position valuecorresponding to an end of the operative auto focus image range, themotion control card outputs a trigger signal. Next, the output triggersignal is input to the system framegrabber, which is operated in anexternally triggered mode during the strobe lighting auto focus mode.Then, the framegrabber issues a first signal that initiates anasynchronous reset of the system camera. This initiates the imageintegration sequence on the camera.

In various exemplary embodiments, after a brief delay that is programmedinto the framegrabber and that is established based on various knowncharacteristics of the vision system components, such as, for example,the camera integration time, the Z-axis scan motion, and variousinherent circuit delays, the framegrabber then outputs a second controlsignal, having a defined duration, to the strobe lighting controller. Inresponse to the second control signal, the strobe lighting controllerinitiates an illumination light pulse from one or more previouslydetermined illumination sources corresponding to the defined duration.In various exemplary embodiments, the second control signal defines boththe power level and the duration of the light pulse. In various otherexemplary embodiments, the second control signal controls the duration,while the light source is driven according to a fixed or default powerlevel. In general, the strobe light power level and pulse durations aretypically determined in combination with various other factors thatinfluence the image characteristics.

In various exemplary embodiments, the second control signal is also usedto latch a current Z-axis position at a time corresponding to the timingof the second control signal. Thus, in various exemplary embodiments,the second control signal is connected directly to the motion controlcard's high-speed position capture latch input, which may be triggeredby the rising edge, or start, of the second control signal. In response,the motion control card latches the current position values of theoptical assembly, in various exemplary embodiments. The current positionvalues are thus acquired and stored in relation to the correspondingworkpiece inspection image for later retrieval and analysis.

In various exemplary embodiments, where timing is not critical, theframegrabber inputs the resultant video data from the camera, output inresponse to a data read signal, so that the data, that is, the workpieceinspection image, is stored in relation to the corresponding Z-axisposition values for later retrieval and analysis. It should beappreciated that the effective image exposure timing and duration is, ofcourse, controlled by the time and duration of the strobe pulse at thepredetermined time during the integration sequence on the camera. Thus,in various exemplary embodiments, the strobe timing and duration inrelation to the timing of the latching of the Z-axis positions are usedin combination with a known Z-axis scan speed during the strobeduration. This further refines the relation between a particular imagehaving a particular focus value and the corresponding Z-axis position,in order to minimize the errors and uncertainties in that relation priorto determining the estimated best focus position for an inspectionimage.

It should be appreciated that, in various exemplary embodiments, theforegoing cascade of various trigger signals and timing durations allhave timings that are controlled by various hardwired connections and/orhigh speed clocks which are not subject to significant unpredictablesoftware delays or timing latencies. Thus, the various exemplaryembodiments according to this invention allow very good combinations ofauto focus speed and accuracy, even in a machine vision system operatingenvironment that generally includes such unpredictable software delaysor timing latencies in other less repetitive and/or less criticalaspects of the machine vision system operation.

It should be appreciated that workpiece inspection images acquiredaccording to various embodiments of the systems and methods describedabove can be provided with far shorter exposure times, and at a farhigher rate of image acquisition for a series of images than is possiblewith the components and methods used in conventional precision machinevision inspection systems, and associated methods of automaticallyfocusing an image capturing device. It should also be appreciated thatwhen a series of workpiece features are to be imaged and inspected athigh magnification, using continuous motion according to the principlesof this invention, each highly magnified field of view has a very smalldepth of field that is traversed and passed by very quickly.Accordingly, the short exposure times, and high image acquisition ratesprovided by the methods described above are particularly important foracquiring highly magnified precision workpiece auto focus and inspectionimages with increased throughput.

It should similarly be appreciated that, although the synchronizationoperations described in connection with the exemplary embodimentsutilizing strobe lighting make use of the inherent features of variousexemplary system components, in various other exemplary embodimentssimilar synchronization features and/or signals may be provided by aseparate timing circuit implemented according to known digital timingcircuit techniques. Such a circuit may be included as a portion of thecontroller 120, in various exemplary embodiments.

Likewise, it should be appreciated that certain existing machine visioninspection systems can employ various embodiments of the systems andmethods according to this invention with minimal or no “retrofit”modifications to such existing machines, and the auto focus capability,robustness and throughput of such machines may still be increasedaccording to the principles of this invention. In various exemplaryembodiments, only the addition of machine vision inspection softwaremethods and/or modifications according to the principles of thisinvention are included in the retrofit modifications.

While this invention has been described in conjunction with theexemplary embodiments outlined above, various alternatives,modifications, variations, improvements, and/or substantial equivalents,whether known or that are or may be presently unforeseen, may becomeapparent to those having at least ordinary skill in the art.Accordingly, the exemplary embodiments of the invention, as set forthabove, are intended to be illustrative, not limiting. Various changesmay be made without departing from the spirit and scope of theinvention. Therefore, the claims as filed and as they may be amended areintended to embrace all known or later-developed alternatives,modifications variations, improvements, and/or substantial equivalents.

1. A method for operating a precision machine vision inspection systemto determine an estimated best focus position that is at leastapproximately a best focus position usable for inspecting a region ofinterest of a workpiece, the precision machine vision inspection systemcomprising: an imaging system comprising: a camera having a pixel setcorresponding to a full field of view of the camera, the camera operableto output the pixel values of at least one configuration of a reducedreadout pixel set, the at least one configuration of a reduced readoutpixel set corresponding to substantially less than the full field ofview of the camera along at least one dimension of the field of view ofthe camera, and at least one lens configuration; a plurality ofcontrollable motion axes including a focus axis, the focus axisincluding a focus axis position sensor; a control system portion; and aworkpiece stage that carries the workpiece, wherein at least one of theworkpiece stage and the imaging system is movable to provide relativemotion with respect to the other at least along the focus axis, themethod comprising: overlapping at least a majority of the region ofinterest and at least part of a reduced readout pixel set in the fieldof view of the camera; providing a motion, the motion includingtraversing a focus image range along the focus axis direction usingcontinuous motion; inputting an auto focus image into the camera duringthe continuous motion, the auto focus image having a respectiveeffective exposure time and exposure duration; outputting the pixelvalues of the reduced readout pixel set of the auto focus image to thecontrol system portion during the continuous motion, the output pixelvalues of the auto focus image corresponding to substantially less thanthe full field of view of the camera along at least one dimension of thefield of view of the camera; repeating the inputting and outputtingsteps to provide data for a plurality of reduced readout pixel setscorresponding to a plurality of auto focus images distributed along thefocus image range; determining respective positions along the focus axisfor at least some of the plurality of auto focus images; and determiningan estimated best focus position that is at least approximately the bestfocus position usable for inspecting a region of interest of a workpiecebased on at least some of the data for a plurality of reduced readoutpixel sets and at least some of the respective positions along the focusaxis for at least some of the plurality of auto focus images, wherein:the output pixel values of the outputting operation are output in a timethat is substantially less than a time required for outputting the fullpixel set corresponding to a full field of view of the camera; repeatingthe inputting and outputting steps is performed within a reduced timethat is less than a standard time that corresponds to inputting an inputimage and outputting a pixel set corresponding to a full field of viewof the camera; the plurality of auto focus images are distributed alongthe focus image range in a manner depending at least partially on thereduced time and the provided motion such that a maximum spacing alongthe focus axis between the respective positions of adjacent auto focusimages is operational for determining the estimated best focus positionthat is at least approximately the best focus position to a desiredlevel of accuracy; and the motion over at least a part of the focusimage range is substantially faster than a fastest motion allowable incombination with the standard time in order to hypothetically produceadjacent auto focus images that are spaced apart along the focus axisdirection by that maximum spacing between the respective positions ofadjacent auto focus images.
 2. The method of claim 1, wherein the motionover at least a part of the focus image range is at least 2.5 timesfaster than a fastest motion allowable in combination with the standardtime in order to hypothetically produce adjacent auto focus images thatare spaced apart along the focus axis direction by that maximum spacingbetween the respective positions of adjacent auto focus images.
 3. Themethod of claim 1, wherein the motion over at least a part of the focusimage range is at least five times faster than a fastest motionallowable in combination with the standard time in order tohypothetically produce adjacent auto focus images that are spaced apartalong the focus axis direction by that maximum spacing between therespective positions of adjacent auto focus images.
 4. The method ofclaim 1, wherein the motion over at least a part of the focus imagerange is at least 90% as fast as the fastest motion allowable incombination with the reduced time in order to hypothetically produce amaximum spacing between the respective positions of adjacent auto focusimages that is equal to a predetermined limit.
 5. The method of claim 4,wherein the method is operable in at least one a lower accuracy mode andat least one higher accuracy mode, and when the method is operated in atleast one lower accuracy mode, the value of the predetermined limit isequal to at least 0.2 times and at most 0.5 times thefull-width-half-maximum width of the expected nominal focus curve widthfor a current lens configuration, and, when the method is operated in atleast one higher accuracy mode, the value of the predetermined limit isequal to at least 0.02 times and at most 0.1 times thefull-width-half-maximum width of the expected nominal focus curve widthfor a current lens configuration.
 6. The method of claim 4, wherein themethod is operable in at least one a lower accuracy mode and at leastone higher accuracy mode, and when the method is operated in at leastone lower accuracy mode, the value of the predetermined limit in micronsis equal to at least (0.18/NA²) and at most (0.45/NA²), where NA is aneffective numerical aperture of a current lens configuration, and, whenthe auto focus tool is operated in at least one higher accuracy mode,the value of the predetermined limit in microns is equal to at least(0.018/NA²) and at most (0.09/NA²).
 7. The method of claim 1, whereinthe at least a majority of the region of interest comprises all of theregion of interest.
 8. The method of claim 1, wherein the at least oneconfiguration of a reduced readout pixel set comprises a set of pixelshaving at least one of a selectable location and a selectable rangealong at least one dimension of the field of view of the camera and theoverlapping step comprises operating the camera according to at leastone of a selected location and a selected to range that overlaps thereduced readout pixel set with the at least a majority of the region ofinterest.
 9. The method of claim 1, wherein the at least oneconfiguration of a reduced readout pixel set comprises a set of pixelshaving a span that is fixed relative to the field of view of the cameraalong the at least one direction and the aligning step comprisespositioning of the workpiece relative to the imaging system according toa position that overlaps the at least a majority of the region ofinterest with the reduced readout pixel set.
 10. The method of claim 1,wherein determining respective positions along the focus axis comprisesdetermining a respective position output of at least the focus axisposition sensor corresponding to each of the at least some of theplurality of auto focus images, each respective position output having atiming that is correlated to the corresponding respective effectiveexposure time.
 11. The method of claim 10, wherein the respectiveposition output and the output pixel values corresponding to each of theat least some of the plurality of auto focus images are stored by thecontrol system portion and determining the focus axis position iscompleted after all of the respective position outputs and the outputpixel values corresponding to each of the at least some of the pluralityof auto focus images are stored.
 12. The method of claim 10, wherein arespective first control signal determines the start of each effectiveexposure duration and determining the respective position outputcomprises capturing the respective position output with a deterministictiming relative to the respective first control signal.
 13. The methodof claim 12, wherein the respective first control signal determines thestart of one of a) a respective electronic shutter duration of thecamera that determines the respective effective exposure duration, andb) a respective strobe illumination duration that determines therespective effective exposure duration.
 14. The method of claim 13,wherein at least one of the continuous motion and the respectiveeffective exposure duration are provided such that for each respectiveauto focus image the maximum motion along the focus axis is at mostequal to at least one of a) a predetermined exposure motion limit, b)0.25 times the predetermined spacing limit, c) 0.5 microns, and d) 0.25microns.
 15. The method of claim 14, wherein the continuous relativemotion includes an acceleration and at least some of the auto focusimages are input during the acceleration.
 16. The method of claim 1,wherein the continuous relative motion includes an acceleration and atleast some of the auto focus images are input during the acceleration.17. The method of claim 16, wherein at least one of the continuousmotion and the respective effective exposure duration are provided suchthat for each respective auto focus image the maximum motion along thefocus axis is at most equal to at least one of a) a predeterminedexposure motion limit, b) 0.25 times the predetermined spacing limit, c)0.5 microns, and d) 0.25 microns.
 18. The method of claim 1, comprising:performing at least the providing, inputting, outputting, repeating,determining respective positions, and determining the estimated bestfocus position steps a first time over a relatively larger focus imagerange with a relatively larger maximum spacing, wherein determining theestimated best focus position comprises determining a relatively moreapproximate focus position; and performing at least the providing,inputting, outputting, repeating, determining respective positions, anddetermining the estimated best focus position steps a second time over arelatively smaller focus image range including the determined relativelymore approximate focus position with a relatively smaller maximumspacing, wherein determining the estimated best focus position stepcomprises determining a relatively less approximate focus position, andthe less approximate focus position is used for inspecting theworkpiece, at least in the region of interest.
 19. The method of claim1, wherein the focus axis position is set at the determined estimatedbest focus position that is at least approximately the best focusposition, an inspection image is acquired at that position, and thatinspection image is used for inspecting the workpiece, at least in theregion of interest.
 20. The method of claim 1, wherein the determinedestimated best focus position that is at least approximately the bestfocus position is used as a feature coordinate value for a feature to beinspected in the region of interest without actually setting the focusaxis position of the precision machine vision inspection system at thatposition.
 21. The method of claim 20, wherein the respective reducedreadout pixel set data having the respective position along the focusaxis that is closest to the determined estimated best focus positionthat is at least approximately the best focus position is used forinspecting the workpiece in the region of interest without actuallysetting the focus axis position of the precision machine visioninspection system at that focus position.
 22. A method of training modeoperation for a precision machine vision inspection system in order todetermine set of machine control instructions usable to automaticallydetermine an estimated best focus position that is at leastapproximately a best focus position usable for inspecting a region ofinterest of a workpiece, the precision machine vision inspection systemcomprising: an imaging system comprising: a camera having a pixel setcorresponding to a full field of view of the camera, the camera operableto output the pixel values of at least one configuration of a reducedreadout pixel set, the at least one configuration of a reduced readoutpixel set corresponding to substantially less than the full field ofview of the camera along at least one dimension of the field of view ofthe camera, and at least one lens configuration; a plurality ofcontrollable motion axes including a focus axis, the focus axisincluding a focus axis position sensor; a control system portion; aworkpiece stage that carries the workpiece, wherein at least one of theworkpiece stage and the imaging system is movable to provide relativemotion with respect to the other at least along the focus axis; and agraphical user interface comprising a display portion usable to displayworkpieces images, and a plurality of user interface elements comprisingat least one auto focus tool, the method comprising: defining a regionof interest and a reduced readout pixel set overlapping with at least amajority of the region of interest, wherein: at least the region ofinterest is defined using an auto focus widget associated with theoperation of an auto focus tool, the auto focus widget positionable on adisplayed image of the workpiece, the output pixel values correspond tosubstantially less than the full field of view of the camera along atleast one dimension of the field of view of the camera, and the pixelvalues of the reduced readout pixel set of an auto focus image can beoutput to the control system portion in a time that is substantiallyless than a time required for outputting the full pixel setcorresponding to a full field of view of the camera; defining a set ofauto focus parameters usable to determine a set of auto focus operationsfor the region of interest; determining a set of auto focus operationsfor the region of interest, comprising: determining a run mode focusimage range, determining a run mode auto focus motion; the auto focusmotion including traversing the focus image range along the focus axisdirection using continuous motion, and determining a run modeillumination level and exposure duration usable for inputting an autofocus image into the camera during the continuous motion; providingoperations to determine a repetitive inputting of respective auto focusimages and outputting of respective data for a plurality of reducedreadout pixel sets corresponding to a plurality of auto focus imagesdistributed along the focus image range during the continuous motion,each of the respective auto focus images having an effective exposuretime and exposure duration; providing operations to determine respectivepositions along the focus axis for at least some of the plurality ofauto focus images; and providing operations to determine the estimatedbest focus position that is at least approximately the best focusposition usable for inspecting a region of interest of a workpiece basedon at least some of the data for a plurality of reduced readout pixelsets and at least some of the respective positions along the focus axisfor at least some of the plurality of auto focus images, wherein: thedetermined repetitive inputting of respective auto focus images andoutputting of respective data for a plurality of reduced readout pixelsets is performed within a reduced time that is less than a standardtime that corresponds to inputting an input image and outputting a pixelset corresponding to a full field of view of the camera; the pluralityof auto focus images are distributed along the focus image range in amanner depending at least partially on the reduced time and the autofocus motion such that a maximum spacing along the focus axis betweenthe respective positions of adjacent auto focus images is operationalfor determining the estimated best focus position that is at leastapproximately the best focus position to a desired level of accuracy;and the auto focus motion is substantially faster along the focus axisover at least a part of the focus image range than a fastest motionallowable in combination with the standard time in order tohypothetically produce that maximum spacing between the respectivepositions of adjacent auto focus images.
 23. The method of claim 22,wherein the auto focus motion is at least 2.5 times faster along thefocus axis over at least a part of the focus image range than a fastestmotion allowable in combination with the standard time in order tohypothetically produce that maximum spacing between the respectivepositions of adjacent auto focus images.
 24. The method of claim 22,wherein the auto focus motion over at least a part of the focus imagerange is at least 90% as fast along the focus axis as the fastest motionallowable in combination with the reduced time in order tohypothetically produce a maximum spacing between the respectivepositions of adjacent auto focus images that is equal to a predeterminedlimit.
 25. The method of claim 22, wherein the maximum spacing along thefocus axis between the respective positions of adjacent auto focusimages is at most equal to a predetermined limit.
 26. The method ofclaim 25, wherein the predetermined limit is determined based on atleast one lens characteristic of a current lens configuration.
 27. Themethod of claim 26, wherein the lens characteristic includes one of a)an expected nominal focus curve width for the current lens configurationand b) a characteristic that at least partially determines an expectednominal focus curve width for the current lens configuration, and thepredetermined limit is effectively approximately proportional to theexpected nominal focus curve width for the current lens configuration.28. The method of claim 25, wherein the auto focus tool includes aplurality of accuracy modes and when the auto focus tool is operated ina first one of the accuracy modes the value of the predetermined limitis equal to at least 0.2 times and at most 0.5 times thefull-width-half-maximum width of the expected nominal focus curve widthfor a current lens configuration and when the auto focus tool isoperated in a second one of the accuracy modes the value of thepredetermined limit is equal to at least 0.02 times and at most 0.1times the full-width-half-maximum width of the expected nominal focuscurve width for a current lens configuration
 29. The method of claim 25,wherein the auto focus tool includes a plurality of accuracy modes andwhen the auto focus tool is operated in a first one of the accuracymodes the value of the predetermined limit in microns is equal to atleast (0.18/NA²) times and at most (0.45/NA²), where NA is an effectivenumerical aperture of a current lens configuration and when the autofocus tool is operated in a second one of the accuracy modes the valueof the predetermined limit in microns is equal to at least (0.018/NA²)times and at most (0.09/NA²).
 30. The method of claim 22, wherein thecontrol system portion automatically defines a reduced readout pixel setthat overlaps with at least a majority of the region of interest. 31.The method of claim 30, wherein the reduced readout pixel set issubstantially identical to the region of interest.
 32. The method ofclaim 22, wherein the at least one configuration of a reduced readoutpixel set includes a reduced readout pixel set having a predeterminedsize and shape and for at least a portion of the time that the autofocus tool widget is displayed on the image of the workpiece, a widgethaving the predetermined size and shape is also displayed to indicatethe location of the reduced readout pixel set.
 33. The method of claim32, wherein a region of interest indicating portion of the auto focustool widget includes a display of the region of interest boundaries, andwhen a boundary of the region of interest indicating portion extendsoutside of the indicated location of the reduced readout pixel set, agraphical user interface element is automatically activated to highlightthat condition.
 34. The method of claim 22, wherein the at least oneconfiguration of a reduced readout pixel set includes a configurationhaving at a span along at least one direction that is fixed relative tothe field of view of the camera along the at least one direction, andwhen a region of interest is defined outside of the span, the controlsystem portion is operable to automatically generate at least onemachine control instruction that positions the at least a majority ofthe region of interest within the span along the at least one direction.35. The method of claim 34, wherein the graphical user interfacedisplays a control widget operable by a user to trigger the operationthat automatically generates the at least one machine controlinstruction that positions the at least a majority of the region ofinterest within the span along the at least one direction.
 36. Themethod of claim 22 wherein the determination of respective positionsalong the focus axis comprises inputting to the control system portion arespective position signal of at least the focus axis position sensorfor at least some of the plurality of auto focus images, each respectiveposition signal corresponding to an effective timing that is correlatedto the corresponding respective effective exposure time.
 37. The methodof claim 36, wherein the continuous motion includes an acceleration andat least some of the auto focus images are input during theacceleration.
 38. The method of claim 22, wherein the precision machinevision inspection system further comprises at least one controllableillumination source that is operable in both a constant illuminationmode and a strobe illumination mode, and determining a set of auto focusparameters comprises: operating at least one controllable illuminationsource in the constant illumination mode during a known camera exposureduration to determine an acceptable total exposure illumination energyusable for inputting an auto focus image into the camera; anddetermining strobe control parameters that determine an illuminationlevel and an effective exposure duration usable for inputting an autofocus image into the camera during the continuous motion using thestrobe illumination, wherein the strobe illumination level and exposureduration provide at least approximately the same total exposureillumination energy as the continuous illumination.
 39. The method ofclaim 38, wherein the control system portion automatically determinesthe strobe control parameters based on the total exposure illuminationenergy provided by the continuous illumination.
 40. The method of claim39, wherein the control system portion automatically determines thestrobe duration such that the motion along the focus axis during thestrobe duration is at most equal to at least one of a) a predeterminedexposure motion limit along the focus axis, b) 0.25 times thepredetermined spacing limit, c) 0.5 microns, and d) 0.25 microns. 41.The method of claim 38, further comprising providing a training modedemonstration that automatically executes operations substantiallyfunctionally similar to the determined operations and displays an imageacquired at the resulting determined estimated best focus position thatis at least approximately the best focus position for user evaluation.42. The method of claim 22, the method further comprising providingoperations that, based at least partially on the estimated best-focusposition, automatically: determine a shorter auto focus image range;determine a shorter auto focus motion; the shorter auto focus motionincluding traversing the shorter focus image range along the focus axisdirection using continuous motion; use the determined illumination leveland exposure duration and determine a repetitive inputting of respectiveauto focus images and outputting of respective data for a plurality ofreduced readout pixel sets corresponding to a plurality of auto focusimages distributed along the shorter focus image range during thecontinuous motion, each of the respective auto focus images having aneffective exposure time and exposure duration; determine respectivepositions along the focus axis for at least some of the plurality ofauto focus images distributed along the shorter focus image range; anddetermine a refined estimated best focus position that is at leastapproximately the best focus position usable for inspecting the regionof interest of a workpiece based on at least some of the data for aplurality of reduced readout pixel sets and at least some of therespective positions along the focus axis for at least some of theplurality of auto focus images distributed along the shorter focus imagerange; wherein the operations performed over the shorter focus imagerange provide a shorter maximum spacing, the refined estimated bestfocus position is relatively less approximate, and the refined estimatedbest focus position is used for inspecting the workpiece, at least inthe region of interest.
 43. The method of claim 22, wherein methodfurther comprises providing operations that set the focus axis positionat the estimated best focus position, acquire an inspection image atthat position, and use that inspection image for inspecting theworkpiece, at least in the region of interest.
 44. The method of claim22, wherein the method further comprises providing operations that setthe estimated best focus position that is at least approximately thebest focus position as a feature coordinate value for a feature to beinspected in the region of interest without actually setting the focusaxis position of the precision machine vision inspection system at thatposition.
 45. The method of claim 22, wherein the method furthercomprises providing operations that select the respective reducedreadout pixel set data having the respective position along the focusaxis that is closest to the estimated best focus position, and use thatrespective reduced readout pixel set data for inspecting the workpiecein the region of interest without actually setting the focus axisposition of the precision machine vision inspection system at thatestimated best focus position.
 46. The method of claim 22, furthercomprising generating and storing the set of machine controlinstructions based on the method.
 47. The method of claim 22, furthercomprising providing a demonstration sequence in the training mode thatautomatically executes operations substantially functionally similar tothe determined operations and displays an image acquired at theresulting estimated best focus position for user evaluation.
 48. Themethod of claim 47, wherein the graphical user interface displays acontrol widget operable by a user to trigger the demonstration sequence.